Skip to content

ci: content-addressed token-storage-detection builds (skip when unchanged) - #221

Open
fichiokaku wants to merge 1 commit into
developfrom
feat/tsd-content-addressed-builds
Open

ci: content-addressed token-storage-detection builds (skip when unchanged)#221
fichiokaku wants to merge 1 commit into
developfrom
feat/tsd-content-addressed-builds

Conversation

@fichiokaku

Copy link
Copy Markdown
Collaborator

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-detection yields a deterministic tree hash of just that directory. Images carry a tree-<hash> tag. On release:

  • hash exists in AR → skip the build, retag the existing image with the release tag (~5s)
  • hash missing (source actually changed) → build as before + add the tree tag

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.

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.
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