-
Notifications
You must be signed in to change notification settings - Fork 20
update task_resume_workflows to also resume processes in CREATED/RESUMED status #984
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
base: main
Are you sure you want to change the base?
Conversation
ff408fb
to
1ac7b2d
Compare
CodSpeed Performance ReportMerging #984 will not alter performanceComparing Summary
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #984 +/- ##
==========================================
+ Coverage 84.42% 84.90% +0.48%
==========================================
Files 213 214 +1
Lines 10354 10390 +36
Branches 1016 1020 +4
==========================================
+ Hits 8741 8822 +81
+ Misses 1344 1295 -49
- Partials 269 273 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ecdc192
to
32bd94a
Compare
e4ce69d
to
7a8f80a
Compare
…MED status - improve start_process to include logic that happens in both executors. - move threadpool executor functions to its own file.
- Add more info about the added graph flow in docs. - Remove `time_limit` from celery NEW_TASK. - Change workflow cannot be resumed error to be more specific - Remove duplicate auth check in `start_process`, its already done in `create_process`. - Move save input step to the processes.py resume_process. removes unnecessary state fetch in resume_task/resume_workflow
- add 2 tests that validate the happy flow of start_process and resume_process. - add unit tests for resume_process - improve unit tests for start_process - move can_be_resumed from api/processes.py to services/processes.py. - improve workflow removed error messages. - revert resume_process incorrect return type. - add can_be_resumed check in _celery_set_process_status_resumed so only correct statuses can be changed. - add process status check in thread_resume_process to only retrieve input state on suspended status. - change api resume workflow with incorrect status test to check all incorrect statuses - update task_resume_workflow tests.
…ess in DB - change _celery_set_process_status_resumed to use transaction. - change _set_process_status_running to use transaction and make sure that its status isn't RUNNING, picked up by another worker. - change get_process_ids_by_process_statuses to not fetch be able to fetch its own process. - change retrieve_input_state in threadpool resume process since the SUSPEND check doesn't work with CELERY since it changes the process status to resumed. - update unit tests.
7a8f80a
to
ca929a8
Compare
8aa938b
to
7d3c634
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, 3 small nitpicks (sorry) and looks like the branch is out of date.
Great work! 😄
...igrations/versions/schema/2025-07-28_850dccac3b02_update_description_of_resume_workflows_.py
Outdated
Show resolved
Hide resolved
… step - update `processes.restart_process` docstring. - add docstrings to `_celery_set_process_status_resumed` and `_set_process_status_running` - clean tests. - fix edgecase of a `CREATED` process being resumed by stopping and starting workflow engine.
7d3c634
to
02c653c
Compare
_celery_set_process_status_resumed
to a transaction to lock process in the DB, preventing more then one worker to pick up the process.thread_start_process
andthread_resume_process
to update process status toRUNNING
within a transaction and make sure that its status isn'tRUNNING
(picked up by another worker).orchestrator/services/celery.py
->orchestrator/services/executors/celery.py
orchestrator/services/processes.py
->orchestrator/services/executors/threadpool.py
thread_start_process
thread_resume_process
thread_validate_workflow
THREADPOOL_EXECUTION_CONTEXT
CREATED
orRESUMED
right after initial form or form step.updated testing:
Related: #898