-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
build: disable metamorphic constants when calling execgen #76309
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Commands such as `./dev test --verbose` might previously would produce two log lines everytime it happens to have to call the genrule for execgen targets: ``` INFO: From Executing genrule //pkg/sql/colexec/colexecwindow:gen-window-framer: initialized metamorphic constant "span-reuse-rate" with value 10 ``` This is because execgen has the tracing package in its dependency tree ``` > go list -f '{{ join .Deps "\n" }}' ./pkg/sql/colexec/execgen/ | grep tracing | head -1 github.com/cockroachdb/cockroach/pkg/util/tracing ``` and that package instantiates this metamorphic constant. This PR sets COCKROACH_INTERNAL_DISABLE_METAMORPHIC_TESTING=true when calling the generator so we don't get metamorphic constants enabled. Something like cockroachdb#75065 would give us more complete coverage of commands that might be generating noise. Release note: None
irfansharif
approved these changes
Feb 9, 2022
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.
bors r=irfansharif |
Build succeeded: |
darinpp
added a commit
to darinpp/cockroach
that referenced
this pull request
Mar 7, 2022
Previously cockroachdb#76309 added the ability to disable metamorphic constants with env variable COCKROACH_INTERNAL_DISABLE_METAMORPHIC_TESTING which disabled the metamorphic constants when set to true. For some tools however (execgen, roachpb/gen) setting an evironment variable may not be always possible. So this PR adds the ability to disable the metamorphic testing through tag `metamorphic_disable`. It would seem that similar thing could be achieved by using the crdb_test_off tag instead. With bazel however this tag is ignored. Fixes cockroachdb#76363 Release justification: Non-production code changes Release note: None
craig bot
pushed a commit
that referenced
this pull request
Mar 7, 2022
77301: loqrecovery: fix json field name in replica info file r=erikgrinaker a=aliher1911 Previously protobuf used camelcase name for repeated field for descriptor change. This was wrong as it was not parsed correctly by marshaller. This fix adds explicit name to proto specification to avoid default name generation. Release justification: This change is low risk as it fixes a bug in new functionality. Release note: None Fixes #77282 77423: build: allow disabling metamorphic constants with tag r=darinpp a=darinpp Previously #76309 added the ability to disable metamorphic constants with env variable COCKROACH_INTERNAL_DISABLE_METAMORPHIC_TESTING which disabled the metamorphic constants when set to true. For some tools however (execgen, roachpb/gen) setting an evironment variable may not be always possible. So this PR adds the ability to disable the metamorphic testing through tag `metamorphic_disable`. It would seem that similar thing could be achieved by using the crdb_test_off tag instead. With bazel however this tag is ignored. Fixes #76363 Release justification: Non-production code changes Release note: None Co-authored-by: Oleg Afanasyev <[email protected]> Co-authored-by: Darin Peshev <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Commands such as
./dev test --verbose
might previously producetwo log lines everytime it happens to have to call the genrule for
execgen targets:
This is because execgen has the tracing package in its dependency tree
and that package instantiates this metamorphic constant.
This PR sets COCKROACH_INTERNAL_DISABLE_METAMORPHIC_TESTING=true when
calling the generator so we don't get metamorphic constants enabled.
Something like #75065 would give us more complete coverage of commands
that might be generating noise.
Release note: None