Refactor how we check job status
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- backend, distributed-systems
Research direction
The issue names check_status, submit_pending_jobs, JobSubmitter, Git.clone, command_line_tools, and the LSF client at batch_systems/lsf_client/lsf_client.py. Start by mapping job status transitions and queue and retry behavior across those entry points. Done would require an agreed scope, defined concurrency and failure semantics, and tests for the listed edge cases.
Written by the indexing model from the issue text.
Description
I think we need to ensure that we're covering all edge cases as we move a job from CREATING to COMPLETED.
A couple of ideas/questions:
- There should only be one instance of check_status running at a time. When there are high loads check_status can hit >5 minutes, but the beat is every 1 minute.
- We need a better way to restart celery. What's been happening is that the Worker will not shutdown gracefully and leave a PID so that it can no longer be started. The beat will restart and continue to queue jobs. When the worker is finally restarted, all of the beat jobs will run at once. This means that check_status will run N times, milliseconds apart, same with submit_pending_jobs, etc.
- Separate queues for check_status/submit job workers
- a status should only be updated in a single place
- Ideally for FAILED we'd just have the decorator catch exceptions
- ensure jobs that shouldn't run concurrently, can never do so (put them in their own queue with a single worker? memcache lock?)
- Maybe implement a state machine for status changes to ensure statuses go in the order we're expecting.
- Need a better way to handle when a git clone fails,
Git.cloneonly checks to see if the directory exists, it doesn't verify the contents. A task will retry if git clone fails and then it'll submit a job with an empty git directory - JobSubmitter only requires the external_id to check for status, we should just call LSFClient instead
- Move logic for what happens when a status is changed to the model. E.g. if a Job goes from RUNNING to COMPLETED, we can update the finished_date in the save function similar to how it's done in Beagle -- so the business logic in the task is easier to read
- Write tests to cover all edge cases.
- avoid functions with side effects like
update_message - I'm not sure what
command_line_toolsdoes - Batch bjobs here: https://github.com/mskcc/ridgeback/blob/8b4891708dbaeca36146f0c319461f22a7681908/batch_systems/lsf_client/lsf_client.py#L205
- How do we prevent Voyager from slowing down when there are a lot of jobs?
- Dominant language
- Python
- Stars
- 1
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mskcc/ridgeback
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Revert toil version on stagingMay be free again @nikhil claimed this 1923 days ago, and no pull request is open. Open
Similar issues
-
README.zh-CN/ja/es still hard-code 501 test counts after README.md went count-freePossibly taken @Aaqibhafeezkhan claimed this today. Openbeginner documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BistaDinesh03/critique#164 · 1 comment ·
Maintainers usually reply within 1 day
-
bug IO
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
MrNeRF/LichtFeld-Studio#3824 ·
Maintainers usually reply within 1 day
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-webui/open-webui#33200 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
The changelog workflow excludes otelbot but not dependabot, so every Dependabot pull request fails the changelog checkPossibly taken @ocelotl claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 82/100
open-telemetry/opentelemetry-python#5825 ·
Maintainers usually reply within 2 days