-
Notifications
You must be signed in to change notification settings - Fork 761
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
[ci] Add OS version to action key in CI #14697
Conversation
Based on the discussion here, I decided to use the |
Apparently, it's...
Oh wait, sorry, this is a different thing. Now I better read again. 😂 But ostensibly, it looks like --remote_default_exec_properties would touch the desired key, whereas this one does the deprecated remote_execution_properties. |
The message of bazelbuild/bazel@6ec75ab (the commit that adds the new option and the deprecation message) might help. |
fd34e57
to
0873aa0
Compare
Changed to |
The previous run did in fact work -- it's just that the FPGA build took almost 40 minutes. So on the plus side, it turns out we are indeed making good use of the caching. We'll just need this build to go through to re-seed the cache since we have effectively just invalidated everything in there now. |
Do we also need to make sure the opentitan platform has exec_properties defined (i.e. not picking up defaults), so the device-side stuff can still be cached and shared? (It looks like that would be done in the crt repo, though.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @milesdai, just minor nits.
This commit injects the OS version into a paramter that is used as part of the action key computation. This should prevent artifacts from different OS's from colliding in the remote cache. Signed-off-by: Miles Dai <milesdai@google.com>
0873aa0
to
f1dc771
Compare
I haven't familiarized myself with Bazel's platform features yet. If this doesn't affect correctness, should we get this merged first, and look into this later? |
Aye, the comment was mostly a discussion about to-do items after this PR. 🙂 |
Yes, I think this is good to go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description calls the use of an incompatible artifact a collision, when really it's just incompatible because of an undocumented dependency on the system, right? Collisions make me think of a crowded cache with too small a key, whereas here the key just doesn't include the information that's sufficient to find an appropriate artifact. (The description can be edited and corrected after the fact, the commit message shouldn't be corrected)
# Inject the OS version into a parameter used in the action key computation to | ||
# avoid collisions between different operating systems in the caches. | ||
# See #14695 for more information. | ||
echo "build --remote_default_exec_properties=OSVersion=\"$(lsb_release -ds)\"" >> "${GCP_BAZELRC}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a plan to make the cache available to non-ci consumers like it was before by putting this into .bazelrc somewhere? If not could we document that the chache doesn't support non-ci users? I'd been using it experimentally until July, without enough instrumentation to see performance gains, but if I'm not mistaken, this is going to prevent cache hits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this will prevent cache hits from anyone not running Bazel with ci/bazelisk.sh
. On our website, we don't actually specify that the remote cache should be used. Rather, a disk cache is recommended.
This commit injects the OS version into a paramter that is used as part
of the action key computation. This should prevent artifacts from
different OS's from colliding in the remote cache.
Signed-off-by: Miles Dai milesdai@google.com
Fixes #14695