-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add checksums cache to build-manifest #78409
Add checksums cache to build-manifest #78409
Conversation
The checksum cache allows to reuse the calculated checksums between build-manifest and promote-release, or between multiple invocations of build-manifest.
Have we considered signing the hash files instead of the originals? That would eliminate 3 as well, or essentially so. I seem to recall some discussion around this but I forget the conclusions... r=me regardless. |
@bors r=Mark-Simulacrum
I think if we want to reduce the amount of signatures we create we should just generate |
📌 Commit c2f4bbd has been approved by |
⌛ Testing commit c2f4bbd with merge a65ddbaff75bba983cb612b2c4ec5dab6c0e54e6... |
💥 Test timed out |
@bors retry |
☀️ Test successful - checks-actions |
During the release process we're currently calculating the SHA256 of each file three times:
build-manifest
, to fill thehash = "f00"
keys of the manifests.promote-release
, to generate the.sha256
files.promote-release
, to generate the.asc
GPG signatures.Calculations 1. and 2. could be merged into a single one if there was a way for
build-manifest
to pass the checksums it generated over topromote-release
. Unfortunately calculation 3. can't be merged as GPG requires extra metadata to be hashed.This PR adds support for merging 1. and 2. by creating the
BUILD_MANIFEST_CHECKSUM_CACHE
environment variable, which points to a JSON file storing a cache of all the calculated checksums.build-manifest
will load it at startup and avoid generating existing checksums, and it will dump its internal checksums cache into it when it exits successfully.This PR also allows to run
build-manifest
multiple times without the need to wait for checksums to be calculated in the following invocations. The speedup will allow to work torwards a fix for rust-lang/promote-release#15 without impacting the release process duration nor our storage costs.This PR can be reviewed commit-by-commit.
r? @Mark-Simulacrum