-
Notifications
You must be signed in to change notification settings - Fork 11.9k
build: allow no-remote-exec targets to be cached on CI #23789
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,14 +136,6 @@ commands: | |
| # cause decryption failures based on the openssl version. https://stackoverflow.com/a/39641378/4317734 | ||
| openssl aes-256-cbc -d -in .circleci/gcp_token -md md5 -k "${<< parameters.key >>}" -out /home/circleci/.gcp_credentials; | ||
| sudo bash -c "echo -e 'build --google_credentials=/home/circleci/.gcp_credentials' >> .bazelrc.user"; | ||
| # Upload/don't upload local results to cache based on environment | ||
| if [[ -n "{$CIRCLE_PULL_REQUEST}" ]]; then | ||
| sudo bash -c "echo -e 'build:remote --remote_upload_local_results=false\n' >> .bazelrc.user"; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this done? Disabling remote caching for targets where remote execution is disabled... Normally this would only be done for things like local dev to read but not write to the remote cache. I thought maybe it was to avoid polluting the cache server with random PRs but most bazel targets (all but 3 or 4) get executed remote and are cached despite this flag. But this is what was causing a few of the unit tests and all the e2e tests (e2e being a WIP) to never be cached. |
||
| echo "Not uploading local build results to remote cache."; | ||
| else | ||
| sudo bash -c "echo -e 'build:remote --remote_upload_local_results=true\n' >> .bazelrc.user"; | ||
| echo "Uploading local build results to remote cache."; | ||
| fi | ||
| # Enable remote builds | ||
| sudo bash -c "echo -e 'build --config=remote' >> .bazelrc.user"; | ||
| echo "Reading from remote cache for bazel remote jobs."; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.