Skip to content

Fail fast on intermediate Bitrise test failures - #14396

Draft
cttsai-stripe wants to merge 2 commits into
cttsai/bitrise-retry-flaky-reportingfrom
cttsai/bitrise-retry-fail-fast
Draft

Fail fast on intermediate Bitrise test failures#14396
cttsai-stripe wants to merge 2 commits into
cttsai/bitrise-retry-flaky-reportingfrom
cttsai/bitrise-retry-fail-fast

Conversation

@cttsai-stripe

Copy link
Copy Markdown
Contributor

Summary

Stop failed intermediate Bitrise Gradle test attempts early, then retry with the existing cleanup flow.

Motivation

An instrumentation test failure is reported before the Gradle process finishes all remaining work. The retry wrapper currently waits for the complete failed attempt, which consumes CI time before starting the next attempt.

What changed

  • Add an explicit --fail-fast-tests mode to the retry wrapper and enable it at the seven existing instrumentation and PaymentSheet E2E retry call sites.
  • Monitor live output only on attempts that have another retry available. Detect the narrow Gradle There were failing tests. marker.
  • Stop the current process group with bounded SIGTERM and SIGKILL handling, stop Gradle daemons, then run the existing orchestrator-cache and emulator cleanup before retrying.
  • Leave the final attempt to complete fully so its diagnostics and exit status are preserved.

What stays the same

  • Compilation, lint, setup, emulator, and other non-test failures are not terminated early.
  • The default wrapper mode remains available for callers that do not opt into fail-fast behavior.
  • PR 1 supplies the intermediate JUnit capture and merge pipeline used by this child.

Coverage

The process suite proves intermediate termination and retry, result capture before overwrite, graceful final-attempt completion, forced termination after the grace period, non-test failure preservation, no orphaned child process, and final exit-status preservation.

Testing

  • Added tests
  • Modified tests
  • Manually verified

Local checks passed on this head: both Python suites passed with 6 tests each, Python compilation passed, bash -n passed, shellcheck passed, bitrise validate passed with Bitrise CLI 2.43.3, the repository pre-push detekt apiCheck passed for both pushes, and git diff --check passed. CI will run for this draft PR.

Screenshots

Not applicable. This changes CI process control only.

Changelog

No user-facing SDK change. No changelog entry is required.

Committed and created by Codex.

cttsai-stripe and others added 2 commits September 3, 2026 17:33
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.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