Retry docker compose up to ride out Docker Hub pull flakes - #62
Merged
Conversation
Transient `registry-1.docker.io ... context deadline exceeded` pulls were failing compose jobs outright (e.g. analyst-ci) and needed a manual re-run. Wrap all 16 `docker compose ... up` invocations across the 11 compose workflows in a bounded 3-attempt retry. The command sits in an `if` condition so it's exempt from the runner's `set -e` (a failed attempt falls through to the retry instead of aborting the step); the 3rd failure `exit 1`s, so a genuinely-broken run still fails. First attempt runs the identical command, so a healthy job is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
Transient Docker Hub pulls (
registry-1.docker.io ... context deadline exceeded) were failing compose jobs outright (e.g.analyst-cithis week) and needed a manual re-run. With #61 they now fail fast — but still fail.Change
Wrap all 16
docker compose … upinvocations across the 11 compose workflows in a bounded 3-attempt retry (15s backoff).Correctness
ifcondition, so it's exempt from the runner'sset -e— a failed attempt falls through to the retry instead of aborting the step.exit 1s, so a genuinely-broken run still fails (a naivefor … && breakloop would return the trailingsleep's 0 and silently mask failure — avoided here).Verified: all 11 workflows parse;
bash -nclean; retry semantics tested underbash -eo pipefail(success→0, total-failure→1, fail-then-succeed→0). Onlyupcommands are wrapped —logs/downuntouched.🤖 Generated with Claude Code