Skip to content

feat: add wait support for job start - #304

Merged
tarostok merged 4 commits into
mainfrom
dev/tarostok/jobstartwait
Nov 1, 2026
Merged

tarostok merged 4 commits into
mainfrom
dev/tarostok/jobstartwait

Conversation

@tarostok

Copy link
Copy Markdown
Contributor

Summary:

Add --wait (-w) to job start so users can wait for job completion with the same completion, failure, and timeout handling as job run.

Preserve asynchronous execution by default.
Support --timeout and --polling_interval when --wait is specified.
Reject timeout and polling options on job start without --wait, before submitting the job.
Reuse existing polling and cancel-on-timeout behavior.
Update command help, documentation, and changelog.
Add regression tests for waiting, failure propagation, timeout option forwarding, cancellation, and validation, while preserving job run behavior.
Context

Users can now choose synchronous or asynchronous execution through job start without switching commands.

Dependencies:
No new dependencies.

Copilot AI balanced review requested due to automatic review settings October 28, 2026 08:52
@tarostok
tarostok requested a review from a team as a code owner October 28, 2026 08:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Negative timeouts are accepted before job submission, causing a later ValueError that bypasses cancellation and leaves the remote job running.

1 open issue
What changed in this PR

Adds optional synchronous execution to job start, reusing the existing job run completion, failure, and timeout handling while keeping asynchronous execution as the default.

Changes:

  • Adds --wait/-w, --timeout, and --polling_interval, rejecting wait-only options before submission when --wait is absent.
  • Adds regression tests for waiting, failures, option validation, timeout forwarding, cancellation, and job run compatibility.
  • Updates command help, documentation, examples, and release notes.
File Description
tests/​test_utils/​test_fab_cmd_job_utils.py Tests wait-option validation and run compatibility.
tests/​test_core/​test_fab_jobs.py Adds command-level waiting and timeout regression tests.
src/​fabric_cli/​utils/​fab_cmd_job_utils.py Rejects start wait-options when waiting is disabled.
src/​fabric_cli/​parsers/​fab_jobs_parser.py Adds wait flags and help examples.
src/​fabric_cli/​errors/​common.py Adds a reusable wait-option validation message.
src/​fabric_cli/​commands/​jobs/​fab_jobs.py Honors the selected execution mode for job start.
docs/​examples/​job_examples.md Demonstrates starting a job with waiting enabled.
docs/​commands/​jobs/​index.md Documents the new start options.
.changes/​unreleased/​added-20261026-191106.yaml Records the new job start functionality.

Review effort: Balanced

@ayeshurun Alon Yeshurun (ayeshurun) changed the title Add wait support for job start feat: add wait support for job start Oct 28, 2026
Copilot AI balanced review requested due to automatic review settings November 1, 2026 10:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The timeout validation tests lack negative-timeout regression cases for both job commands asserting ERROR_INVALID_INPUT and no submission API call, plus coverage confirming zero is accepted.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 1, 2026 11:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the optional synchronous job-start change.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 1, 2026 12:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the addition of optional synchronous execution for job start.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@tarostok
tarostok merged commit 458959f into main Nov 1, 2026
15 checks passed
@tarostok
tarostok deleted the dev/tarostok/jobstartwait branch November 1, 2026 12:46
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.

3 participants