Skip to content

Retry dave build on transient registry failures - #8

Merged
aa8y merged 4 commits into
masterfrom
ci-build-retry
Aug 30, 2026
Merged

Retry dave build on transient registry failures#8
aa8y merged 4 commits into
masterfrom
ci-build-retry

Conversation

@aa8y

@aa8y aa8y commented Aug 30, 2026

Copy link
Copy Markdown
Owner

What

The first master run of #7's redesign failed in dave build with Docker Hub 429 Too Many Requests while resolving base-image manifests — the one pipeline stage the redesign left without a retry (tests and push got one). It was aggravated by cold buildcache-* refs from the previously failed master run: nothing to import means every base image is really pulled, and 10 shards at -j 3 resolving manifests near-simultaneously trip the rate limit.

  • Wrap dave build in the same bounded retry as the push step (3 attempts, 60s/120s backoff). A second dave build finds every already-built layer in the local store, so a retry redoes only the tags the 429 actually killed.
  • mkdir -p the two persisted cache dirs up front so the always() cache saves stop warning about a missing path when a shard dies before first writing them.

Verification

  • actionlint clean, YAML parses.

🤖 Generated with Claude Code

The first master run of the retry/skip redesign failed in dave build:
with cold buildcache refs every shard really pulls its base images, and
10 shards at -j 3 resolving manifests near-simultaneously tripped Docker
Hub's 429 rate limit -- the one pipeline stage the redesign left without
a retry. Same bounded-retry shape as the push step; a second dave build
finds every already-built layer in the local store, so a retry redoes
only the tags the 429 killed.

Also mkdir the two persisted cache dirs up front so the always() cache
saves stop warning about a missing path when a shard dies early.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aa8y
aa8y enabled auto-merge (squash) August 30, 2026 18:02
aa8y and others added 3 commits August 30, 2026 11:17
The build retry alone did not survive the second run: the 429s are not a
short burst but an exhausted shared hourly pull quota, which minutes of
backoff cannot restore. Each context only has two or three distinct FROM
images, so pull them exactly once per shard (with retry) and let every
build resolve FROM from the local image store instead of hammering
Docker Hub ~21 times per shard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The rerun surfaced the real PR-run killer: with CACHE_TO_SCOPE set for
the whole job, every build exports a mode=max cache at -j 3 across 10
shards -- ~30 concurrent registry writers, the same arithmetic that
forced dave push to -j 1. The writes 429 and take the builds down with
them.

Split the knob: CACHE_FROM_SCOPE (job-wide on same-repo PRs) keeps the
scoped-ref import so a retry still rebuilds to identical image IDs,
while CACHE_TO_SCOPE now only exists on a dedicated post-build step that
re-runs dave build at -j 1 -- a full local cache hit, so upload-only --
with continue-on-error, because a throttled cache export must never fail
a shard whose images built and will be tested regardless.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Upstream pagila added a pgvector example (CREATE EXTENSION vector) in
July 2026; postgres:18-alpine cannot satisfy it, so init aborts and the
container never becomes ready -- a deterministic readiness timeout on
both arches whenever the git HEAD checksum busts the cache. Switch the
extract from a HEAD clone to the pinned pre-2026-07 commit tarball the
recorded expected counts were measured against. Upgrading to current
pagila is its own change: pgvector in the image plus re-recorded
expectations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aa8y
aa8y merged commit cbfc792 into master Aug 30, 2026
14 of 24 checks passed
@aa8y
aa8y deleted the ci-build-retry branch August 31, 2026 21:47
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