New modular workflow runner - #2437
Merged
sawenzel merged 1 commit intoAug 21, 2026
Merged
Conversation
sawenzel
requested review from
chiarazampolli,
davidrohr,
jackal1-66 and
shahor02
as code owners
August 21, 2026 11:41
|
REQUEST FOR PRODUCTION RELEASES: This will add The following labels are available |
sawenzel
enabled auto-merge (rebase)
August 21, 2026 12:57
sawenzel
disabled auto-merge
August 21, 2026 14:25
This is the main step of a refactoring of MC/bin/o2_dpg_workflow_runner.py, presented at CHEP 2026. The 2000-line script becomes a package, resource monitoring moves off the scheduling loop and costs about a tenth of what it did, and the scheduling policy becomes selectable, with two alternatives to the original one. Both runners are installed side by side and a dispatcher picks between them, so nothing changes for a caller that does not ask for the new one. - MC/bin/o2_dpg_workflow_runner.py becomes that dispatcher. It reads ALIEN_O2DPG_WORKFLOW_RUNNER and defaults to "legacy". The original runner moves unchanged to MC/bin/o2dpg_workflow_runner_legacy.py, and the o2dpg_workflow_runner.py symlink beside it is untouched, so all ten call sites in the repository keep working under either runner. - MC/workflow_runner/ holds the new package: workflow, graph, resources, monitoring, scheduler, executor, cleanup and cache modules. - Monitoring moves to a background thread with separate CPU and memory cadences. Polling psutil synchronously in the scheduling loop cost 10-20 % of a core on realistic workflows; this costs 1-2 %. - --scheduler-policy selects timeframe, which is the default and reproduces the original ordering, critical-path, or best-fit. - --systemd-run supersedes --cgroup for confining a workflow to a CPU and memory budget. - --cache-policy writes a fingerprint of command, environment, software tag and dependencies next to the _done marker, so a task whose command changed re-runs instead of being skipped. _done remains the skip marker. - Every flag the original parser accepts, the new one accepts. --cgroup, --webhook and --checkpoint-on-failure are accepted, ignored and warned about, so a JDL passing them through ALIEN_O2DPG_ADDITIONAL_WORKFLOW_RUNNER_ARGS still runs. - 68 unit tests come with it, run by a new CI job in .github/workflows/syntax-checks.yml. No Python test ran in CI before. - MC/workflow_runner/o2dpg_runner/README.md documents the layout, the behavioural differences and the pitfalls found while building it. https://indico.cern.ch/event/1471803/contributions/6967072/ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
This is the main step of a refactoring of MC/bin/o2_dpg_workflow_runner.py, presented at CHEP 2026. The 2000-line script becomes a package, resource monitoring moves off the scheduling loop and costs about a tenth of what it did, and the scheduling policy becomes selectable, with two alternatives to the original one. Both runners are installed side by side and a dispatcher picks between them, so nothing changes for a caller that does not ask for the new one.
https://indico.cern.ch/event/1471803/contributions/6967072/