feat: centralized scheduler + dispatch_id support (#918)#180
Open
ilayfalach wants to merge 4 commits into
Open
feat: centralized scheduler + dispatch_id support (#918)#180ilayfalach wants to merge 4 commits into
ilayfalach wants to merge 4 commits into
Conversation
…zed scheduler (#918) Luigi's central scheduler differentiates tasks only by task family + parameters. The generated nodes carried no luigi.Parameter, so distinct runs of the same workflow collided/deduplicated. Add a dispatch_id parameter, propagate it through requires(), and isolate per-dispatch output targets. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…cute handler (#918) handler_execute (used by the hermes-workflow CLI, hera build/execute and the OpenFOAM CLI) hardcoded --local-scheduler and had a TODO to make the engine selectable. Build the command via a shared buildLuigiExecutionCommand helper that supports local/central scheduler + host/port, and propagate a dispatch_id (uuid4 default). Expose the matching flags on the hermes-workflow execute and buildExecute subcommands. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…id (#918) Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Summary
dispatch_idas aluigi.Parameterto every generated Luigi node, so parallel or repeated workflow runs produce isolated output directories instead of colliding on the same target files.workflowAssembly.execute()to acceptscheduler,schedulerHost,schedulerPort, anddispatch_idkeyword arguments, supporting both local and centralized Luigi schedulers.dispatch_idthroughrequires()so every node in the DAG receives the same run ID automatically.Tests
tests/test_dispatch_id_template.py— unit-tests the generated Luigi node template: verifies the parameter is declared, propagated, and used to namespace output targets.tests/test_run_workflow.py— end-to-end integration test that builds and executes the Tutorial workflow (CopyDirectory → RunPythonCode → finalnode) with the local scheduler and two different dispatch IDs, asserting both runs complete and write to independent subdirectories.Test plan
pytest tests/test_dispatch_id_template.py— passes without any hermes runtime depspytest tests/test_run_workflow.py— requiresluigiinstalled; runs the full workflow with--local-schedulerCloses #918
Addresses #958
🤖 Generated with Claude Code