Skip the docs CI image build when that ref was already built - #70675
Merged
Conversation
Docs for a ref are published more than once - an RC, then the final docs after the vote - and the second publish rebuilds an image the first one already built from the very same commit. Seeding the build cache with that image, as #70650 does, still pays for a docker load, a registry push, a build that hits cache on every layer, an export and two multi-gigabyte stash uploads, none of which can produce anything the first publish did not already produce. Reusing the image outright rather than as a cache turns on knowing it was built from this commit. A ref does not say that: a branch documented twice moves between the two publishes, so its image is a good cache and a wrong answer. The commit each image is stashed with is what tells those apart, and it is stashed on its own so that deciding costs a few bytes rather than the image the decision may make unnecessary. Reusing it also means publishing nothing, which the shared per-branch stash could not support: it is written by every build on this branch, so whoever restores it next would get sources they never asked for. The ref's own stash is the one this run's docs and registry jobs now read, so a run with nothing to build leaves them reading what the previous publish left there. The mount cache moves with it for the same reason - it holds the dependency set the sources resolve to, and a ref's and the branch tip's are exactly what differ.
potiuk
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jason810496 and
jscheffl
as code owners
July 29, 2026 10:27
shahar1
approved these changes
Jul 29, 2026
Contributor
Backport failed to create: v3-3-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker f346e64 v3-3-testThis should apply the commit to the v3-3-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
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.
Follow-up to #70650.
Docs for a ref get published more than once — an RC, then the final docs after the vote — and today the second publish rebuilds an image the first one already built from the very same commit. #70650 made that image usable as a build cache; this makes it usable as the answer, so the second publish skips the build entirely.
image-stash-suffixbecomesimage-stash-ref(the caller passes the ref, not-<ref>), so every ref-dependent step names it:Restore CI docker image built for ref providers-amazon/9.0.0 …,Stash cache mount … for ref …, and the matching restores in the docs and registry jobs.git rev-parse HEADtakes the fast path only for an identical commit and otherwise falls back to today's seed-and-build. The marker is stashed last and with the image's retention, so finding it implies the image is still there; the fast path is also off forpush-image: truecallers, which have an errand beyond producing the image.The first publish after this merges still builds — existing per-ref stashes carry no commit marker.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines