-
Notifications
You must be signed in to change notification settings - Fork 184
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
feat: CI/local S3 build cache #8802
Merged
Merged
Conversation
This file contains 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
ludamad
force-pushed
the
ad/build-cache-tool
branch
from
September 25, 2024 21:24
141169f
to
09d85a7
Compare
ludamad
changed the title
feat: initial S3 build cache pass
feat: CI/local S3 build cache
Sep 27, 2024
Changes to public function bytecode sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
charlielye
approved these changes
Sep 27, 2024
Changes to circuit sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
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.
What this PR achieves: Optional S3 caching in Earthly files with a 2nd layer of file caching (except in C). A future step would be to use this cache locally for fast bootstrapping. Currently implemented for barretenberg and noir.
If AWS credentials are available with this script, S3 will be used as a download source. Otherwise, just the local minio cache will be used. If both are used, minio will act like a pull-through cache for S3 and provide a two-tiered caching solution good for when earthly is being really forgetful and you are using artifacts that have not changed in a while.
USAGE NOTE: After this PR, you will want to run on scripts/setup-earthly-local.sh or equivalent if not using zsh. This will create an alias for earthly as earthly-local in the repo, which sets up scripts and starts the (currently always on) file server.
USAGE NOTE: Because we use git to reliably make content hashes that aren't prone to changing due to temporary files, we require all changes to be committed before we content hashes will be used. The cache will not be used at all if there are staged changes. Taking feedback on this.
I recommend doing something like
git commit -am 'sync' && earthly ...
if changing files in a loop (possibly with --amend). Remember togit add
new wanted files or you may get old cache.USAGE NOTE: If you do not want AWS secrets in the env for every program you can figure out your own wrapper alias, perhaps reading from files
EARTHFILE DEV NOTE: There is a little bit of a dance to grab rebuild patterns and run with the git context on the local machine. To enable this, WORKDIR needs to match the repo layout, some adjustments thusly
Bundled:
Followups: