Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: refactor: reduce code duplication in request processing #892

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

jshimkus-rh
Copy link
Contributor

@jshimkus-rh jshimkus-rh commented May 6, 2024

This provides the agreed upon usage of PENDING w/ status text containing the specific message:

The workers available to process request type {request_type} for
{process_parent_type} {process_parent_id} are failing liveness checks.
There may be an issue with the node; please contact the administrator.

as distinguishing a request that cannot be run due to complete lack of workers.

The message text above is slightly modified from that documented in AAP-23378 for consistency with other log messages from the processing code.

Orchestrator log messages were updated due to previous change that specifically set the request type if none was specified.

@jshimkus-rh jshimkus-rh requested a review from a team as a code owner May 6, 2024 20:43
This provides the agreed upon distinction between
- PENDING
    a normal occurrence of a request not yet running
- PENDING_WORKERS_OFFLINE
    an abnormal occurrence where the request has not yet run and cannot run due
    to lack of workers; note that this includes auto-start events where we
    definitively know the request's state
- WORKERS_OFFLINE
    an abnormal occurrence where we do not know the request's state

PENDING_WORKERS_OFFLINE maintains the fail-over functionality previously dependent
solely on WORKERS_OFFLINE.

For consistency with other log messages from the processing code the content of the message indicating issues with the workers has been modified from that documented in AAP-23378.  It is worded as follows:

    The workers available to process request type {request_type} for
    {process_parent_type} {process_parent_id} are failing liveness checks.
    There may be an issue with the node; please contact the administrator.

Orchestrator log messages were updated due to previous change that specifically set
the request type if none was specified.
@ttuffin
Copy link
Contributor

ttuffin commented May 7, 2024

To me that message is contradictory - it implies there are workers available, when in fact they are not responding to liveliness checks, which in essence means they are unavailable.

Dostonbek1 and others added 2 commits May 7, 2024 12:04
* bump DAB version to 2024.5.6
* add PATCH action for detail view OPTIONS
* add tests for PATCH/POST actions on OPTIONS request

Co-authored-by: Alan Rominger <[email protected]>
@jshimkus-rh
Copy link
Contributor Author

To me that message is contradictory - it implies there are workers available, when in fact they are not responding to liveliness checks, which in essence means they are unavailable.

@ttuffin Updated per our slack convo.

@jshimkus-rh jshimkus-rh requested a review from a team May 7, 2024 18:24
src/aap_eda/core/enums.py Outdated Show resolved Hide resolved
@jshimkus-rh
Copy link
Contributor Author

All outstanding issues and critiques have been addressed.

@Alex-Izquierdo
Copy link
Contributor

HI @jshimkus-rh I'm finally covered this with #894

@jshimkus-rh jshimkus-rh changed the title fix: [AAP-23378] add PENDING_WORKERS_OFFLINE activation status fix: [AAP-23378] add PENDING w/ status text indicating non-runnable reason (i.e., no workers). May 8, 2024
@jshimkus-rh
Copy link
Contributor Author

HI @jshimkus-rh I'm finally covered this with #894

True. However, I saw that as a stopgap to fixing the regression from #880.

@Alex-Izquierdo
Copy link
Contributor

I'm addressing some other issues there as well. Also, I'm not sure, but I had there to update some tests, which makes sense since we are changing the behavior. I'm receiving some "pressure" from mates because right now the devel builds are mostly in an useless state, I'm trying to finish it as soon as possible to unblock it and continue working on other issues. I would like to take advantage of the situation to extend the coverage of the integration tests, but due to the rush for the fix I think we can do it in later PR's.

I suggest to continue working there, because I'm already tested it in different deployments and try to have it ready for merge soon.
Hopefully we can have a stable version and we continue working from there with the rest of issues.

@jshimkus-rh jshimkus-rh marked this pull request as draft May 9, 2024 13:05
@jshimkus-rh
Copy link
Contributor Author

Converted to draft. To be revisited post next release.

@jshimkus-rh jshimkus-rh changed the title fix: [AAP-23378] add PENDING w/ status text indicating non-runnable reason (i.e., no workers). WIP: refactor: reduce code duplication in request processing May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants