-
- Downloads
Fix stability issues in capability service
This is two lines of thought combined into one merge: 1. AMQP clients should either receive messages or send messages 2. Capability queues are based on a database-backed queue manager rather than keeping state in-memory Most of the work relating to the first idea comes in refactoring the Router to not be a message sender. Many places in the code now either instantiate a MessageSender instead, or use both a Router and a MessageSender if they truly needed both functionalities. The previous implementation appears to have caused messages to arrive out of order because facilities like `wf_monitor` that only send messages were also trying to receive messages, and either not handling them at all or putting them into a buffer of some kind to be dropped on the floor when the process ended. The work relating to the second idea changes the way that steps are processed in the capability service and eliminates the capability engine concept. Now when PrepareAndRunWorkflow steps are reached, the capability is simply moved into the Waiting state and the queue manager is signaled. Whenever the queue manager is awakened, it checks to see if any queues have slots available and requests waiting. If they do, the number of available slots are used to get requests and start executing them. When an execution exits the cluster, the queue manager is signaled again, so the process continues until all the jobs are processed. As a stability benefit, we check this on startup as well.
parent
c2e23ed8
No related branches found
No related tags found
Pipeline #2785 passed
Stage: cache-build
Stage: build
Stage: unit-test
Stage: test-coverage
Stage: push
Stage: deploy-coverage-page
Stage: deploy
Stage: e2e-test
Stage: .post
Showing
- apps/cli/utilities/system_mediator/system_mediator/arbitrator.py 6 additions, 15 deletions...i/utilities/system_mediator/system_mediator/arbitrator.py
- apps/cli/utilities/system_mediator/test/test_arbitrator.py 10 additions, 13 deletionsapps/cli/utilities/system_mediator/test/test_arbitrator.py
- apps/cli/utilities/wf_monitor/test/test_wf_monitor.py 7 additions, 4 deletionsapps/cli/utilities/wf_monitor/test/test_wf_monitor.py
- apps/cli/utilities/wf_monitor/wf_monitor/monitor.py 10 additions, 5 deletionsapps/cli/utilities/wf_monitor/wf_monitor/monitor.py
- services/capability/capability/server.py 4 additions, 10 deletionsservices/capability/capability/server.py
- services/capability/setup.py 2 additions, 1 deletionservices/capability/setup.py
- services/capability/test/test_capability_request_views.py 5 additions, 12 deletionsservices/capability/test/test_capability_request_views.py
- services/workflow/setup.py 3 additions, 4 deletionsservices/workflow/setup.py
- shared/messaging/messaging/messenger.py 82 additions, 23 deletionsshared/messaging/messaging/messenger.py
- shared/messaging/messaging/router.py 6 additions, 15 deletionsshared/messaging/messaging/router.py
- shared/messaging/test/conftest.py 1 addition, 1 deletionshared/messaging/test/conftest.py
- shared/messaging/test/test_messenger.py 4 additions, 43 deletionsshared/messaging/test/test_messenger.py
- shared/messaging/test/test_router.py 6 additions, 3 deletionsshared/messaging/test/test_router.py
- shared/workspaces/test/test_capability_engine.py 0 additions, 53 deletionsshared/workspaces/test/test_capability_engine.py
- shared/workspaces/test/test_capability_queue.py 79 additions, 26 deletionsshared/workspaces/test/test_capability_queue.py
- shared/workspaces/test/test_capability_queue_new.py 0 additions, 161 deletionsshared/workspaces/test/test_capability_queue_new.py
- shared/workspaces/test/test_capability_service.py 1 addition, 0 deletionsshared/workspaces/test/test_capability_service.py
- shared/workspaces/test/test_capability_steps.py 0 additions, 9 deletionsshared/workspaces/test/test_capability_steps.py
- shared/workspaces/test/test_execution_manager.py 23 additions, 14 deletionsshared/workspaces/test/test_execution_manager.py
- shared/workspaces/test/test_workflow_service.py 3 additions, 6 deletionsshared/workspaces/test/test_workflow_service.py
Loading
Please register or sign in to comment