Conversation
Signed-off-by: Marvin Froeder <velo.br@gmail.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.
Downstream test jobs kept failing with
Could not find artifact io.github.openfeign.querydsl:querydsl-core:jar:7.7-SNAPSHOT, preceded byCache not found for input keys: build-artifacts-<sha>— even on runs where thecompilejob had loggedCache saved with key: build-artifacts-<sha>minutes earlier. This produced false red CI on #1910 and #1930; both went green on a plain re-run.Root cause
The repo sits at its Actions cache quota, and the eviction sweep takes the one entry the fan-out depends on.
maven-deps-*setup-java-Windows-x64-maven-*Linux-maven-java *build-artifacts-*build-artifactsis ~1.1% of cache usage but 100% of the critical path for 12 jobs. Each run writes ~1.4 GB of fresh cache; four dependabot runs starting within two minutes push ~5.6 GB into an already-full bucket, and a 15 MB entry touched exactly once is trivial collateral next to the half-gigabyte entries every job keeps refreshing.Ruled out: a save/restore race (downstream
needs: compile, and on run 34811542003 compile ended 06:00:13Z with downstream starting 06:00:16Z), cache scoping (entries carryref: refs/pull/N/merge, shared within a run), and key collision (github.shais unique).Why it was intermittent
.github/actions/setup-buildcaches all of~/.m2/repositorywith read-writeactions/cache@v4. The compile job installs the SNAPSHOT jars there before that post-save fires, somaven-deps-<hash>usually smuggles the querydsl SNAPSHOTs along and abuild-artifactsmiss is silently harmless. When a pom change shiftshashFilesandrestore-keys: maven-deps-falls back to an older entry without them, the miss becomes fatal.That is also a latent correctness hazard in its own right: stale SNAPSHOTs from an unrelated commit can green a genuinely broken build. Not addressed here — excluding
io/github/openfeign/querydslfrom that cache path is fragile to get right (!negation combined with~) and deserves its own change.Fix
Pass the compiled jars between jobs as a run-scoped artifact instead of a cache. Artifacts are not subject to the cache quota or LRU eviction, and are the intended mechanism for handing build output between jobs in one run. The 12 duplicated restore blocks collapse into one composite action.
Also fixes
gh run rerun --failed, which could never work before: re-running only failed jobs skipscompile, so nothing repopulated the cache and every downstream job died on the missing artifact. A single flaky database job therefore forced a full-matrix re-run. Artifacts attach to the run rather than the attempt, so a skipped-as-successfulcompilestill leaves them fetchable.The
buildgate job keeps its exact name and all 14needs:entries — verified by parsing the YAML, since branch protection requires that context.Risks
overwrite: trueis load-bearing:upload-artifact@v4returns 409 on a duplicate name, so a full re-run (wherecompilere-executes) would fail without it.retention-days: 7means re-running a run older than a week fails loudly, though GitHub permits re-runs up to 30 days. Storage is ~15 MB per run either way.examples-quarkus's stagingcp -rstill finds the directory (it has nosetup-buildstep, but does check out before the composite action runs).This does not address the quota itself —
maven-depsplus the twosetup-javafamilies are 11.2 GB of the 12 GB. Those look like redundantsetup-javacache: mavenusage layered on the explicitmaven-depscache and are worth a separate audit. After this change the quota no longer affects correctness, since nothing on the critical path is cached.🤖 Generated with Claude Code
https://claude.ai/code/session_01RpEVyasZwxJsGMwjQwVdax