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.
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
Forward
exec_properties
to main test spawn's execution info #24979base: master
Are you sure you want to change the base?
Forward
exec_properties
to main test spawn's execution info #24979Changes from 1 commit
5091e1d
9160b4e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Nit: I think it would be better to keep the old test setup and add new targets for
my_test
rule. That would show that the old behavior is unchanged forsh_test
(?)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.
sh_test
no longer lives in the Bazel codebase and isn't versioned together with Bazel. Since this test necessarily depends on internals of the rule (the actions it registers), it wouldn't be self-contained if it used that rule.In fact, the test in its previous state relied on
sh_test
to register a "build action" that is also backed by a spawn, butsh_test
usesctx.actions.symlink
, which is spawn-less. This hid the bug that the different test spawns used different execution infos. Using a custom rule defined within the test avoids this class of issues.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.
+1 to self-contained tests.
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.
Nit: I think it's less confusing to use either spawn or action and not both.
I thought that using the mnemonics directly might help, but afaik the test execution and xml generation have the same "TestRunner" mnemonic?
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.
I think that we need to talk about both (with their precise meaning as in the Bazel codebase, not the user-facing docs) specifically because the bug this PR fixes is not visible on the action level (test actions have the correct execution info set), but shows up on the spawn level (that may or may not correctly inherit this information).
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 is an unfortunately important implementation detail for tests like this.