Repository navigation
fix(build): normalize copied file modes in component images - #1512
Merged
Merged
Conversation
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
…onent-file-modes Signed-off-by: Kevin Wang <wy721@qq.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.
Cloning with
umask 0002gives copied scripts and text files different permissions from the release checkout, changing image layers and digests even when their contents match. Set explicit COPY permissions in Gateway, KMS, Verifier, and Bun auth-eth. Pin Bun release BuildKit and normalize exported timestamps using the commit timestamp. Document local reproduction and the clone-time umask requirement for older tags.Validation:
git diff --checkpass.umask 0022: Gateway86de97186adeccc625cbda00f1d7a189d62555c56cf0463814abb75f5733d122, KMSe68766063cb3e792a85919ad500d16805b57f8d8b7424b71ff46a3c8cf5709fd, and Verifier22aeb6808e38a56115f843d4d66f4852407e72f6080d5f8781fd82d9f819db41(all SHA-256). Package-list checks pass and checkouts remain clean. At fixed commit0cd3bfe34c, Gateway independently cloned underumask 0002and0022produces the same digest:sha256:dc6d7fbb89d8ce6608ca3bb067eec0244c25ad1257ec64bd72d7a8e19484fb6d. Both runs rebuild the binary (about 11 minutes each), validate package lists, and leave clean checkouts. OCI metadata and the actual manifest hash agree; copied scripts are 0755 and text files 0644. KMS at the same fixed commit also passes both independent clone-time umasks (0002and0022), with identical digestsha256:4b387426808848431fa141d9975f4e59282fc095bf46a562f34153b34fc8a481. Both runs exit zero, leave clean checkouts, verify the OCI manifest hash and metadata digest, and retain builder/runtime pins matching HEAD. Scripts are 0755 and text files 0644; both runs execute compilation (about 10 minutes each). Paired evidence is retained infixed/kms/comparison.json, with per-run verification, pins, logs, metadata, and OCI exports. Fixed-commit builds use an 8-CPU/64-GiB builder with shared cache andNO_CACHEunset; changed input modes invalidate the compilation cache. Verifier also passes both clone-time umasks at the same fixed commit, with identical digestsha256:f2c03a005feb81729665117ca94751777f32274acc3f8767c14999060119a8b7. Both runs exit zero, leave clean checkouts, verify manifest/metadata digests and unchanged builder/runtime pins, and actually compile Rust. The script is 0755; pins and configuration are 0644. All three paired comparisons now pass (six full builds, twelve unchanged pins files).linux/amd64, Rustx86_64-unknown-linux-musl; builder limited to 8 CPUs/64 GiB with max-parallelism 2, sequential builds, shared isolated cache without registry cache imports andNO_CACHEunset.IMAGE_VERSION=0.6.3, explicit source revision, commit-derivedSOURCE_DATE_EPOCH(1793591245 for the fixed revision), no push. All six fixed builds execute compilation; subsequent validation/export reuses each run's cache. Total fixed sequence: about 63 minutes. Conditions, commands, logs, metadata, pins checks, and comparisons are retained locally; large OCI exports are retained separately. The tested three-component build inputs are unchanged by the subsequent Bun-only changes and cluster-test merge.rewrite-timestamp=true. Without timestamp rewriting,/appdirectory mtimes differ. This is a local permission/timestamp comparison, not a claim of matching an existing Bun release digest.Published 0.6.3 tags and images are unchanged.