feat: add wmill job rerun subcommand#9275
Conversation
Deploying windmill with
|
| Latest commit: |
998f1e2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d49ac799.windmill.pages.dev |
| Branch Preview URL: | https://wmill-job-rerun.windmill.pages.dev |
|
Claude finished @hugocasa's task in 3m 47s —— View job Review — PR #9275Mergeable, but should ideally address nits: (1) cc @hugocasa Code reviewThe wire format for both commands matches the frontend exactly:
No bugs, security issues, or perf concerns found. Both new commands follow the existing Findings
Test coverage
|
Codex ReviewGood to merge No issues found. Checked for bugs, security, and AGENTS.md compliance. Test coverage CLI and generated guidance/docs only. I did not see new automated CLI tests, but the PR wires existing backend endpoints that already have backend coverage, and the PR body lists relevant manual CLI checks. Manual verification before merge should cover |
Summary
Adds two CLI subcommands for re-running completed jobs from the command line:
wmill job rerun <id>— equivalent of the frontend "Run again with same args" button. WrapsbatchReRunJobsfor the single-job case.wmill job restart <id> --step <step-id> [--iteration <n>]— restart a completed flow at a top-level step. WrapsrestartFlowAtStep. EE-only feature on the backend.Both print the new job UUID on stdout so they compose, e.g.
wmill job rerun <id> | xargs wmill job logs.Changes
rerun: sends{ job_ids: [<id>], script_options_by_path: {}, flow_options_by_path: {} }(defaults match the frontend button's "with same args" semantics). Parses the newline-separated stream response, surfacesError:lines vialog.error, exits non-zero if no new UUID was returned.restart: sends{ step_id, branch_or_iteration_n? }. Same wire format / body shape asFlowRestartButton.svelte. Required--step, optional--iterationfor top-level branchall / for-loop iteration restart.cli/src/guidance/core.ts.system_prompts/auto-generated/andcli/src/guidance/skills.gen.tsviapython system_prompts/generate.py(required by AGENTS.md sincecli/src/commands/changed).Out of scope
restartFlowAtStepalso accepts anested_patharray for restarting inside nested containers (BranchOne / ForLoop iteration / Subflow). CLI ergonomics for nested paths are awkward (would need either a JSON flag or a repeatable--nested-stepparser) and demand is low — for nested restart, use the UI.Test plan
wmill job rerun <id>against a recently completed script job prints a new job UUID; piping intowmill job get <id>shows the new job ran with the same argswmill job rerun <id>against a flow job works the same way (new flow run id, same args)wmill job --helplists bothrerunandrestartwmill job rerun <unknown-uuid>exits non-zero withFailed to re-run job <id>wmill job restart <flow-id> --step <step-id>on an EE backend prints a new flow UUID; flow resumes from the chosen stepwmill job restart <flow-id> --step <step-id> --iteration <n>resumes a top-level for-loop / branchall at iterationnwmill job restart <id>without--stepexits non-zero with a usage error