-
Notifications
You must be signed in to change notification settings - Fork 4.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 no-remote-cache and no-remote-exec execution requirements #8710
Add no-remote-cache and no-remote-exec execution requirements #8710
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
I'd like to add some tests around the new execution requirements before merging, but I figured I'd open the PR so it can start getting some feedback |
@ishikhman when you get a minute could you look over this? It's fairly short, and I'd love some feedback :) |
f0ac726
to
34bbd88
Compare
Finished adding tests and squashed commits |
src/main/java/com/google/devtools/build/lib/exec/SpawnLogContext.java
Outdated
Show resolved
Hide resolved
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 a lot for doing this change!
I keep thinking whether it makes sense to add no-remote-cache
which behaves exactly the same as no-cache
.. other than that - just a few notes from my side (will have another look next week, sorry for the delay)
src/main/java/com/google/devtools/build/lib/actions/ExecutionRequirements.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/actions/ExecutionRequirements.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/actions/ExecutionRequirements.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/exec/SpawnLogContext.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
Outdated
Show resolved
Hide resolved
b5bf143
to
d37986d
Compare
Force-push was squashing commits and rebasing on master |
src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnCache.java
Outdated
Show resolved
Hide resolved
4732e96
to
9007b78
Compare
Force push was squashing commits |
@ishikhman @buchgr @ola-rozenfeld I think this is ready for final review :) |
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.
Perfect! Thanks a lot :)
just a few nit comments from me, otherwise LGTM
src/main/java/com/google/devtools/build/docgen/templates/attributes/common/tags.html
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/actions/Spawns.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java
Outdated
Show resolved
Hide resolved
src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java
Outdated
Show resolved
Hide resolved
f265107
to
25259e6
Compare
Force push was squashing commits |
@buchgr @ola-rozenfeld could you review when you get a minute? |
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.
Sorry, missed the one use case in the initial review:
what if we have combined cache - remote (http for now) and local (disk) - AND no-remote-cache tag. For now, bazel would still be using both caches, but should use only disk cache in such a case.
I think we missed this use case. Could you please add test cases and maybe code changes for that?
src/test/java/com/google/devtools/build/lib/remote/RemoteSpawnCacheTest.java
Show resolved
Hide resolved
bb5066c
to
a81d501
Compare
Force-push was squashing commits and rebasing on master |
fbe1542
to
1f17262
Compare
e88ed86
to
a372c8d
Compare
Force-push was squashing commits and rebasing on master |
a372c8d
to
15d7c6b
Compare
Woops, I wasn't actually rebasing on master before because our fork was a bit out of date 😅 Synced our fork and rebased on master now. |
@ishikhman could you review again when you get a chance? Do we also need @buchgr and/or @ola-rozenfeld to review before merging? |
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.
LGTM, thanks a lot!
@SrodriguezO I'll try to merge it in the next days :)
FYI for the future PRs: please avoid force pushing, it makes changes a bit less obvious during code review ;) Everything will be merged as one commit in the end, with the message taken from the PR description.
Ah okay. Sorry about that. I'll avoid force pushes in the future. Thanks for the review! |
@ishikhman what should I do about rebasing though? For instance, the branch has a conflict, but to fix it I have to either rebase on master (which would require a force-push) or merge master in (which makes the git history a bit messy). Which path would you suggest? Edit: In this particular case I was able to fix the conflict without merging master or rebasing because it was a very simple one, but my question stands for the general case :) |
In this case I usually prefer rebasing to master, cause that won't produce additional commits like merge would do :) PS: merge is coming today. |
yay! great job both! |
I see; thanks for the advice! And thanks for all the feedback on the PR :) |
This resolves #7932
It introduces two new execution requirements:
no-remote-exec
: disallows remote execution without preventing remote cachingno-remote-cache
: disallows remote caching without preventing remote execution or local cachingThe current behavior of
no-remote
andno-cache
remain unchanged.