ci: merge the shared infra retries into a step's own retry rules - #38808
Merged
Conversation
`set_retry_on_agent_lost` gives every step four automatic retries for failures that belong to the infrastructure rather than the step: a lost agent, an agent stopped by the OS, exit 128 for a registry or GHCR hiccup, and exit 199 for a Rust ICE. It skipped any step that declared `retry.automatic` of its own, so a step asking for one extra rule lost all four instead of gaining a fifth. Nothing reports that, and the step then hard-fails on precisely the transient classes the shared rules exist for. The loss is worth more than it looks. The mzcompose plugin deliberately propagates 128 and 199 out of a job rather than collapsing them to 1, so that these rules can match, and `mzbuild` exits 128 when a required image cannot be pulled. A step that overrode the rules therefore went red on the first failed image pull where every other step retried twice. Merge instead of skip, adding only the rules a step does not already declare, and leave a step that retries on every exit status alone since it covers them already. Thirteen steps across the test, nightly and spec-sheet pipelines regain rules they were silently missing, among them every `devel-docker-tags`, the four `k8s-node-recovery` steps, both Terraform steps and `console-sql-test`. `check-merge-with-target` regains the agent-lost rule alone, having re-listed the other three by hand. Re-listing the shared rules in a step stays correct and is now redundant rather than required. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
bosconi
approved these changes
Sep 12, 2026
bosconi
left a comment
Member
There was a problem hiding this comment.
👏 We should ask Claudex to find more of these.
antiguru
enabled auto-merge (squash)
September 12, 2026 00:34
Member
Author
|
Thanks for the review! |
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.
set_retry_on_agent_lostgives every step four automatic retries for failures that belong to the infrastructure rather than the step: a lost agent, an agent stopped by the OS, exit 128 for a registry or GHCR hiccup, and exit 199 for a Rust ICE. It skipped any step that declaredretry.automaticof its own:So a step asking for one extra rule lost all four rather than gaining a fifth. Nothing reports that, and the step then hard-fails on precisely the transient classes the shared rules exist for.
The loss is worth more than it looks.
ci/plugins/mzcompose/hooks/commanddeliberately propagates 128 and 199 out of a job rather than collapsing them to 1, with a comment saying that overwriting them "turns a self-healing infra failure into a job that stays red until someone retries it by hand", andmzbuild.pyexits 128 when a required image cannot be pulled. A step that overrode the rules went red on the first failed image pull where every other step retried twice — the MinIO Docker Hub outage fixed in #38802 is exactly that shape.Merge instead of skip, adding only the rules a step does not already declare, and leave a step that retries on every exit status alone since it covers them already.
What regains coverage
Applying the old and new function to every checked-in template, thirteen steps were silently missing rules:
devel-docker-tags,console-sql-testcheck-merge-with-targetdevel-docker-tags,aws-real,aws-glue-schema-registry-real, 4×k8s-node-recovery-*,terraform-aws-upgrade,terraform-azuredevel-docker-tagsAfter the change every step in every template carries all four, with no duplicated rules. The
ci/deploysteps retry onexit_status: "*"and are left untouched.Re-listing the shared rules inside a step stays correct and is now redundant rather than required; I left the existing re-listings in place rather than widen the diff.
Found by the post-merge QA review on #38797.
🤖 Generated with Claude Code