Skip to content

Make CI retries cheap and integration tests less flaky - #7

Merged
aa8y merged 1 commit into
masterfrom
ci-retry-resilience
Aug 30, 2026
Merged

Make CI retries cheap and integration tests less flaky#7
aa8y merged 1 commit into
masterfrom
ci-retry-resilience

Conversation

@aa8y

@aa8y aa8y commented Aug 30, 2026

Copy link
Copy Markdown
Owner

What

Two goals: a re-run of a failed shard skips everything that already passed for the same commit, and the failures that force re-runs happen less often.

Skip-on-retry (same SHA)

  • Persist the identical-image dedupe stamp dir (DDS_TEST_CACHE) across re-run attempts via actions/cache, keyed itest-stamps-<context>-<arch>-<sha>-<attempt> with a SHA-scoped restore prefix, saved if: always() so a partially failed shard still banks its passing tags. Correctness is inherent to the stamp key (image ID + exact expected-file bytes).
  • The build template now imports the PR-scoped buildcache ref it exports (buildcache-<tag>-<arch>-pr), so a retried PR shard rebuilds to identical image IDs and actually hits its stamps.

Flakiness reduction

  • run*.sh exit 3 for deterministic assertion failures (mismatched counts, missing expected file, corrupt sqlite db) and other codes for infra trouble (readiness timeout, docker/network errors). New test/integration/with-retry.sh — wired into every manifest test: template — retries only the infra class, once (DDS_ITEST_RETRIES/DDS_ITEST_RETRY_DELAY).
  • bin/dataset-checksum gains an opt-in DATASET_CHECKSUM_FALLBACK last-known-good store (persisted via actions/cache): a transient upstream-metadata blip no longer degrades the fingerprint to unknown, which used to bust the EXTRACT layer cache and force a full re-download from the very upstream that was flaking. Only clean fetches refresh the store.
  • dave push retries up to 3 times with 60s/120s backoff on registry 429s; retries are upload-only (full local cache hit).

Verification

  • 224 unit tests pass; bash -n + shellcheck clean on new/changed scripts; actionlint + YAML validation clean on the workflow; manifest parses with all ten templates rendering as intended.
  • Checksum fallback and retry wrapper smoke-tested end to end (degraded with/without fallback, unset-env byte-identical behavior, retry/no-retry/exhaustion).

Docs: docs/testing.md documents the exit-code contract, wrapper knobs, stamp persistence, and checksum fallback.

🤖 Generated with Claude Code

Two goals: a re-run of a failed shard should skip everything that already
passed for the same commit, and the failures that force re-runs in the
first place should happen less often.

Skip-on-retry: persist the identical-image dedupe stamp dir across re-run
attempts of a commit via actions/cache. The stamp key (image ID + exact
expected-file bytes) already guarantees correctness, so persistence only
adds the skip. The build template now also imports the PR-scoped
buildcache ref it exports, so a retried PR shard rebuilds to identical
image IDs and actually hits its stamps.

Flakiness: run*.sh now exit 3 for deterministic assertion failures and
other codes for infra trouble; the new with-retry.sh wrapper (wired into
every manifest test template) retries only the latter, once.
bin/dataset-checksum gains a persisted last-known-good fallback so a
transient upstream-metadata blip no longer degrades the fingerprint to
unknown and busts the EXTRACT cache. dave push retries up to 3 times
with backoff on registry 429s.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aa8y
aa8y merged commit 6b04081 into master Aug 30, 2026
1 check passed
@aa8y
aa8y deleted the ci-retry-resilience 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