Repository navigation
Drop jobs law already counts as finished from the backlog before poll() fixes the job count - #348
Merged
Conversation
Contributor
Author
|
@cms-flaf-bot please test |
Collaborator
|
pipeline#16080868 started |
Collaborator
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.
Summary
A CRAB or HTCondor driver whose first submission round is skipped can poll for ever for a job that does not exist. law's
poll()fixes the job count (len(job_data), backlog included) once at its start, and law'ssubmit()drops fromunsubmitted_jobsevery job whose branches already exist (law 0.1.21workflow/remote.py:860-866,:1036). On a fresh run such a job is also injobs: luigi's scheduling (process_resources→_can_skip_job,remote.py:551-566,:365-381) recorded it there as finished, while_run_implput every chunk in the backlog (remote.py:707-714), so it is counted twice until that drop. In plain law the drop happens in thesubmit()right beforepoll(); when FLAF skips that round because the job sources cannot be read, it happens inside the loop, and the loop waits for one job more than there are. Seen in the HH_bbWW CRAB CI on 2026-10-17: two rounds were skipped while the software tree was being rebuilt, and the HistFromNtupleProducerTask poll stayed atall: 8 … finished: 7with 7 jobs.Changes
SubmissionGuards._drop_complete_backlog(), called at the top ofSubmissionGuards.poll()(both proxies) before law takes the count: drops from the backlog every job_can_skip_jobpasses, as law'ssubmit()does. A resumed run is not affected since Keep per-era process state apart and re-check resumed jobs on a fresh look #345 (run()clears the verdicts before law reloadsjobs, so law records such a job again before dropping it); there the drop only comes earlier, and it repairs a submission file an earlier driver dumped with such a job counted twice..github/copilot-instructions.md: thepoll()invariant.docs/workflow/htcondor.mdalready states that a skipped round loses nothing).Testing
run()/submit()/poll(); only_submit_groupand the batch system scripted), for both proxies: a skipped first round with a complete job, and a resumed backlog with a complete job (a control). Without the change the skipped-first-round tests hang (n_finished_min4.0 for 3 jobs); with it all pass. CI unit list: 738 tests + 805 subtests at 73afc0b and 766 tests + 807 subtests on its merge with main 51aa310 (Rename period to era and pass a Corrections instance to the analysis hooks #347), in a clean venv with the CI pins.DSProdCrabWorkflowProxy.poll, merged).run()gathers again leaves its scheduling-time finished record injobswhile the job stays in the backlog; it is counted twice whenever it is not submitted beforepoll(). Rare (outputs deleted while a scheduled workflow waits); to be handled in a follow-up.