Skip to content

Add --fail-fast: cancel the remaining runs at the first final failure - #65

Merged
jochen-testingbot merged 1 commit into
mainfrom
feat/fail-fast
Oct 31, 2026
Merged

jochen-testingbot merged 1 commit into
mainfrom
feat/fail-fast

Conversation

@jochen-testingbot

Copy link
Copy Markdown
Contributor

Item 1 of the follow-up list. This branch is built on #63 (--timeout), so merge #63 first. After that, this PR's diff is just the one fail-fast commit.

What

--fail-fast for maestro, espresso and xcuitest:

  • A failure counts once it won't be retried:
    • Maestro: a flow whose latest attempt failed after using up the --retry budget, or a run that ended without passing and without any flows.
    • Espresso/XCUITest: a failed run in the last --retry round. Their retries run in rounds after all runs finish, so fail-fast only acts in the last round.
  • When that happens, the CLI cancels the runs still queued or running, using the same stopActiveRuns as Ctrl-C and --timeout.
  • It then keeps polling until those runs have stopped, and reports as usual: summary, --report, --download-artifacts, JSON and the CI job summary. The result is failed with error: "Stopped after the first failure (--fail-fast)", exit code 2.
  • After the cancel, no new retries start (Maestro would otherwise retry the cancelled flows). Completion is then decided by the run states alone.
  • --fail-fast with --async is rejected.

Tests

  • tsc, eslint and prettier pass.
  • jest: 868 passed.
  • New tests:
    • The other runs are cancelled and their stop is waited for.
    • A flow still within its retry budget does not trigger fail-fast; the retry failing does.
    • Cancelled flows are not retried.
    • Espresso stops only the busy runs, and waits for the last retry round.
    • The --async combination is rejected.

A failure counts once it will not be retried (Maestro: the flow's latest
attempt with the --retry budget used up; Espresso/XCUITest: the last retry
round). The CLI cancels the runs still queued or running, keeps polling
until they settle and then reports as usual, with an error saying why.
@jochen-testingbot
jochen-testingbot merged commit 261ac02 into main Oct 31, 2026
12 checks passed
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