-
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
fix: Use execProperties when remoteExecutionProperties is empty #19792
fix: Use execProperties when remoteExecutionProperties is empty #19792
Conversation
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.
This change looks reasonable, but it also changed the behavior in the test //src/test/shell/bazel/remote:remote_execution_test
.
Can you please update the tests to make sure they're still covering the same behavior that they were (not just changing the message checks to match the current). You'll probably need to explicitly clear out the exec properties (if that's what's causing the change).
Also can you add tests for these scenarios:
- exec properties is set and remote execution properties is not
- exec properties is set and remote execution properties is also set (exec properties should be ignored here)
src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformUtils.java
Outdated
Show resolved
Hide resolved
I am not sure I understand how to modify the exec properties from within those tests @katre ; do you have an example I could follow? I am planning on having tests to check the precedence order as follow:
|
So, for the existing test failures in remote_execution_test:
As far as new tests, here are some samples to crib from:
That will hopefully get you started, let me know if you have further questions. |
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 so much! The new tests are very useful. I have a few small comments but once you resolve those I'll be happy to get this merged. I really appreciate you working through the review with me and adding the tests.
src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformUtils.java
Outdated
Show resolved
Hide resolved
When defining a platform (for RBE); remote_execution_properties is marked as deprecated in [^1], thus we do not set it. If it is not set getPlatformProto does not read the execProperties instead, before defaulting to defaultExecProperties. [^1]: https://bazel.build/reference/be/platforms-and-toolchains#platform.remote_execution_properties
2a846c7
to
703a830
Compare
@katre thanks for all the reviews. I pushed many small commits for the review comment for ease of review. I am not familiar with the merge process in this project but the intent here to squash all those into one commit on merge. Thanks for the pointers into other examples; they really helped in putting those tests together. Other things that helped were:
I used IDEA JVM remote debugger in combination with the following command to run a single test without sharding; pretty good debug experience!
|
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.
This looks good! It will be imported to our external repository for a further review and testing (which our team will handle), and then once submitted there be re-exported to GitHub as a single squashed commit.
When defining a platform (for RBE); remote_execution_properties is marked as deprecated, thus we do not set it. If it is not set getPlatformProto does not read the execProperties instead, before defaulting to defaultExecProperties.