buildkite: add per-job timeouts and automatic retries#1586
Open
ViralBShah wants to merge 3 commits into
Open
Conversation
Adds timeout_in_minutes: 90 and retry.automatic for agent disconnects and stops to all four jobs in .buildkite/runtests.yml. The retry block self-heals transient agent failures (e.g. an agent dropping seconds into a job) without requiring a manual rebuild. The timeout protects shared agents from a hung test holding capacity indefinitely. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
|
Can you set a max number of retries? Otherwise in theory we can get caught in an infinite loop of retries. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1586 +/- ##
==========================================
- Coverage 94.37% 94.36% -0.01%
==========================================
Files 35 35
Lines 15981 15981
==========================================
- Hits 15082 15081 -1
- Misses 899 900 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Lowers the per-condition retry limit from 2 to 1, so each job retries at most twice total (once for an agent disconnect, once for an agent stop). Bounds the worst-case retry budget tighter while still covering the transient-flake case the retry block is meant to handle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Member
Author
|
Doesn't the |
Member
|
Ah, I missed that, yes it does. |
DilumAluthge
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
timeout_in_minutes: 90to all four Buildkite jobs so a hung test can't hold a shared agent indefinitely.retry.automaticforexit_status: -1andsignal_reason: agent_stop(limit 2) so transient agent disconnects self-heal instead of turning PRs red.Motivation
Recent dependabot PR #1585 went red because the
macos-aarch64agent dropped ~4 seconds into the job — a clear infra flake, not a test failure. With these settings Buildkite would have retried automatically and the PR would have stayed green. Thetimeout_in_minutesis defensive: today there's no upper bound on how long a stuck job can hold an agent.Test plan
retryblock parses and shows up in the Buildkite UI for each step🤖 Generated with Claude Code