Skip to content

Seed CDN cache from matrix job into build jobs#622

Open
bschwedler wants to merge 1 commit into
mainfrom
seed-cdn-cache
Open

Seed CDN cache from matrix job into build jobs#622
bschwedler wants to merge 1 commit into
mainfrom
seed-cdn-cache

Conversation

@bschwedler

Copy link
Copy Markdown
Contributor

The matrix step resolves dev versions from the CDN and outputs them as a build matrix. Each subsequent job runs on a fresh runner and re-queries the CDN independently. If the daily CDN updates between the matrix step and a build or merge step, the resolved version changes and the --image-version filter no longer matches any target, producing a "no targets" failure.

Fix this by uploading the populated requests-cache filesystem cache (/tmp/bakery_cache/) as a run-scoped artifact after the matrix step, then restoring it before each bakery build and bakery ci publish invocation. The cache keys are deterministic (blake2b of the normalized request URL), so the pre-seeded responses are found by lookup without any code changes to bakery itself. The restore step uses continue-on-error so runs that build no dev versions (empty cache) degrade gracefully.

Closes #304

requests-cache uses a filesystem backend at /tmp/bakery_cache/ with
deterministic blake2b keys derived from the request URL. The matrix
job's CDN lookups populate this cache, but each subsequent job runs
on a fresh runner and re-queries the CDN independently.

If the daily CDN updates between the matrix step and a build/merge
step, the resolved version changes and the --image-version filter no
longer matches, producing a "no targets" failure (issue #304).

Upload the populated cache as a run-scoped artifact after the matrix
step and restore it before each bakery invocation that follows. The
restore uses continue-on-error so production builds (no dev versions,
no CDN cache) degrade gracefully rather than failing.
@bschwedler bschwedler requested a review from ianpittwood as a code owner June 17, 2026 14:32
@github-actions

Copy link
Copy Markdown

Test Results

1 894 tests  ±0   1 894 ✅ ±0   11m 12s ⏱️ -21s
    1 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 8b48252. ± Comparison against base commit eca9265.

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.

Dev version builds occasionally fail in native builder workflows

1 participant