Bug re-run#44
Merged
Merged
Conversation
Two bugs caused woom to restart all tasks on re-run when all jobs had previously succeeded. Bug 1 – wrong identity comparison in Workflow.run(): `status.name is JobStatus.SUCCESS` compared a str to an Enum member using `is`, which is always False. Tasks that already succeeded were never skipped. Fixed: `status is JobStatus.SUCCESS`. Bug 2 – spurious sentinel submission on re-run: get_task_status() called load_job(..., append=True), adding every previously-run job to self.jobmanager.jobs even for skipped tasks. submit_sentinel() then saw a non-empty list and dispatched a new PBS job on every subsequent run, even when nothing was submitted. Fixed: sentinel is only called when n_submitted > 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix: tasks restarted after a fully successful run (#28)
Problem
When all tasks had succeeded and
woom runwas called again withoutwoom clean, every task was re-submitted instead of being skipped.Observed on Datarmor (PBS Pro).
Root causes
Bug 1 – wrong identity comparison
status.name is JobStatus.SUCCESScompared astrto anEnummembervia
is, which is alwaysFalse. Fixed tostatus is JobStatus.SUCCESS.Bug 2 – spurious sentinel PBS job
load_job(..., append=True)inget_task_status()populatedjobmanager.jobswith already-finished jobs, causingsubmit_sentinel()to dispatch a new PBS job on every re-run even when nothing was submitted.
Fixed by gating the sentinel on
n_submitted > 0.Changes
woom/workflow.py— Enum comparison fix + sentinel submission guardCHANGES.rst— bug fixes documented under Job overview #28mds/bug28_restart_on_success.md— detailed root-cause reportCheck list
CHANGES.rstapi.rst