Skip to content

ci: ride out GitHub's transient failures in the image and release workflows - #1143

Merged
cjorge-thegraph merged 2 commits into
mainfrom
ci/ride-out-github-failures
Dec 1, 2026
Merged

cjorge-thegraph merged 2 commits into
mainfrom
ci/ride-out-github-failures

Conversation

@cjorge-thegraph

Copy link
Copy Markdown
Contributor

GitHub fails often (5xx from ghcr.io or the API, rate limits, dropped connections, runners lost mid-job). Until now a single such error failed the image build on main (so latest, and staging through Kargo, missed that commit) or a release (so Kargo's release pipeline saw no version tag) until someone re-ran it by hand.

What changes (image.yml, release.yml; production's ci-cd-production.yml is untouched):

  • Registry and git calls retry. .github/scripts/registry.sh wraps every docker push, imagetools inspect/create and the release's git fetch: a failed call is tried again after 10 s, doubling to 2 minutes, 8 attempts (about 9 minutes). "Not found" is an answer, not a failure, so the release still waits up to 40 minutes for the commit's image as before.
  • latest only moves forward. It used to be pushed by every run of main, so re-running an older run moved it, and staging, backwards. It now moves only to main's tip or to a descendant of the commit latest names (its org.opencontainers.image.revision label), as graph-explorer-x and subgraph-studio already do. The image job checks out main's history (blobless) for this.
  • A failed run is re-run once on its own. rerun.yml: when a push-started run of Image or Release fails, its failed jobs run again 5 minutes later, once. This covers what can't be retried inside a step (checkout, setup actions, a lost runner). Both workflows are safe to run again: a version tag never moves, and latest never moves backwards.

The release job was already idempotent (an existing version tag at the same digest succeeds; at another digest it fails). That's unchanged.

Tested: registry.sh against a fake docker (transient errors retried then success; giving up after 8; not-found returned at once; latest kept for an older commit, moved for the tip, for a descendant and when absent); shellcheck; actionlint (only the custom runner labels flagged).

🤖 Generated with Claude Code

cjorge-thegraph and others added 2 commits December 1, 2026 17:14
…kflows

Registry and git calls retry with backoff (.github/scripts/registry.sh), latest
only moves forward when an older run is re-run, and a failed Image or Release
run started by a push is re-run once on its own (rerun.yml).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cjorge-thegraph
cjorge-thegraph merged commit ba0fe90 into main Dec 1, 2026
4 checks passed
@cjorge-thegraph
cjorge-thegraph deleted the ci/ride-out-github-failures branch December 1, 2026 19:52
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