ci: content-addressed token-storage-detection builds (skip when unchanged) - #221
Open
fichiokaku wants to merge 1 commit into
Open
ci: content-addressed token-storage-detection builds (skip when unchanged)#221fichiokaku wants to merge 1 commit into
fichiokaku wants to merge 1 commit into
Conversation
Content-address the t-s-d image by the git tree hash of apps/token-storage-detection. On release: if tsd:tree-<hash> exists in AR, skip the ~10min Rust build and retag it with the release tag; otherwise build as before and add the tree tag. Current image seeded with its tree tag so the next release already benefits.
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.
t-s-d rarely changes but its Rust build costs ~10 min on every release tag.
How it works:
git rev-parse HEAD:apps/token-storage-detectionyields a deterministic tree hash of just that directory. Images carry atree-<hash>tag. On release:Invariant: every release tag still gets a t-s-d image (identical bytes when unchanged), every image is content-addressed. Deploy jobs and GKE flow untouched. The current image is already seeded with its tree tag (tree-1d8a9962...), so the next release skips immediately.
Follow-up candidate (not in this PR): the t-s-d Dockerfile does
COPY . .right after the manifests, so even changed builds recompile all deps — a standard cargo layer-split would speed those up too.