Skip to content

feat: centralized scheduler + dispatch_id support (#918)#180

Open
ilayfalach wants to merge 4 commits into
masterfrom
Issue918
Open

feat: centralized scheduler + dispatch_id support (#918)#180
ilayfalach wants to merge 4 commits into
masterfrom
Issue918

Conversation

@ilayfalach

@ilayfalach ilayfalach commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds dispatch_id as a luigi.Parameter to every generated Luigi node, so parallel or repeated workflow runs produce isolated output directories instead of colliding on the same target files.
  • Extends workflowAssembly.execute() to accept scheduler, schedulerHost, schedulerPort, and dispatch_id keyword arguments, supporting both local and centralized Luigi schedulers.
  • Propagates dispatch_id through requires() 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 deps
  • pytest tests/test_run_workflow.py — requires luigi installed; runs the full workflow with --local-scheduler
  • Existing hermes tests still pass

Closes #918
Addresses #958

🤖 Generated with Claude Code

Ilay Falach and others added 4 commits June 15, 2026 16:34
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant