-
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
roachtest: expand tag functionality to allow filtering by conjunctive… #99402
Conversation
This PR has deliberately avoid implementing a full syntax to support complex logical tag expressions in favour of simplicity and being mostly backward compatible; some changes have been made[1]. Today, we can filter tests based on any number of However, there is no way to show all weekly tagged admission-control owned tests. This PR introduces the ability to specify a csv for each This can be combined with the original "any-of" behaviour. Tags which must not be present can also be specified. The linked issue cites [1]
|
5f7d901
to
849109d
Compare
3e25cd4
to
f1ed77d
Compare
Compared to previous runs on master, |
38fe0ee
to
fd89815
Compare
After cockroachdb#99723 merged as a bandaid for cockroachdb#98783, the aws roachtest nightly began to panic because of a different roachtest papercut cockroachdb#96655. Specifically, because roachtest filters which tests run on which cloud within the evaluation of the test closure, tests meant to run on gce will still get registered in an AWS run. During the registration of the gce test `restore/tpce/400GB/gce/nodes=4/cpus=8/lowmem` _on aws_, the aws test harness panics because the aws roachprod implementation does not have a low memory cpu configuration. This patch prevents this panic and should be reverted once the pr cockroachdb#99402 merges. Epic: None Release note: None
99312: sqlsmith: add DEFAULT expressions to newly added columns r=mgartner a=mgartner Sqlsmith now builds `ALTER TABLE .. ADD COLUMN .. DEFAULT` statements with default expressions that have different types than the column type. This is allowed if the default expression type can be assignment-casted to the column's type. Fixes #98133 Release note: None 99348: testutils: move default test tenant message r=rharding6373 a=herkolategan In order to reduce logging noise but still inform test authors of the default test tenant, the message has been moved to where there is a `testing.TB` interface. Epic: CRDB-18499 99835: opt/execbuilder: add panic catching to buildRoutinePlanGenerator r=mgartner a=mgartner This commit adds a panic catcher to callback functions created in execbuilder and invoked during evaluation of UDFs and correlated subqueries. It matches the panic catcher logic in `buildApplyJoin`. Fixes #98786 Release note: None 100267: roachtest: own autoupgrade to TestEng r=renatolabs a=tbg Discussed in #99479. Epic: none Release note: None 100286: roachtest: prevent aws roachtest panic r=rail a=msbutler After #99723 merged as a bandaid for #98783, the aws roachtest nightly began to panic because of a different roachtest papercut #96655. Specifically, because roachtest filters which tests run on which cloud within the evaluation of the test closure, tests meant to run on gce will still get registered in an AWS run. During the registration of the gce test `restore/tpce/400GB/gce/nodes=4/cpus=8/lowmem` _on aws_, the aws test harness panics because the aws roachprod implementation does not have a low memory cpu configuration. This patch prevents this panic and should be reverted once the pr #99402 merges. Epic: None Release note: None 100294: tenantcapabilitiestestutils: add a missing default case r=ajwerner a=ajwerner The test should fail if we ever add a new type of capability and use it in the data driven test but don't update the test to handle it. Epic: none Follow-up from #100217 (review) Release note: None 100296: rpc: correctly check for nil before cast r=ajwerner a=andrewbaptist As part of the fix of #99104, a cast without a nil check was introduced. This PR addresses that by only casting if it is known to be not nil. Epic: none Fixes: #100275 Release note: None Co-authored-by: Marcus Gartner <[email protected]> Co-authored-by: Herko Lategan <[email protected]> Co-authored-by: Tobias Grieger <[email protected]> Co-authored-by: Michael Butler <[email protected]> Co-authored-by: ajwerner <[email protected]> Co-authored-by: Andrew Baptist <[email protected]>
After #99723 merged as a bandaid for #98783, the aws roachtest nightly began to panic because of a different roachtest papercut #96655. Specifically, because roachtest filters which tests run on which cloud within the evaluation of the test closure, tests meant to run on gce will still get registered in an AWS run. During the registration of the gce test `restore/tpce/400GB/gce/nodes=4/cpus=8/lowmem` _on aws_, the aws test harness panics because the aws roachprod implementation does not have a low memory cpu configuration. This patch prevents this panic and should be reverted once the pr #99402 merges. Epic: None Release note: None
fd7651f
to
5cb0195
Compare
This PR does not fix one of the quirks of roachtests, which in the case of #100286, resulted in a panic. The issue stems from the fact that all tests are registered, regardless of what cloud is running. Roachtest authors are responsible for providing a |
5cb0195
to
f0cd82c
Compare
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.
There potentially needs to be error handling when making a clusterspec, which would prevent adding of that test to the registry.
Right. Methinks we could easily validate all clusterspecs against corresponding cloud APIs. This could be done immediately after choosing which roachtests to execute but before allocating any resources.
Compared to previous runs on master, tpccbench/nodes=3/cpu=16/enc=true was missing, but is now appropriately tagged in this PR
How did you find the missing one? Also, looking at master there are 68 executed by only 66 on your branch. Are we missing any?
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @herkolategan, @msbutler, and @renatolabs)
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.
Left a couple of minor comments, otherwise looks good!
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @herkolategan, @msbutler, @renatolabs, and @smg260)
build/teamcity/util/roachtest_util.sh
line 66 at r9 (raw file):
aws) if [ -z "${FILTER}" ]; then FILTER="tag:aws"
Much nicer!
pkg/cmd/roachtest/main.go
line 193 at r9 (raw file):
roachtest list acceptance copy/bank/.*false roachtest list tag:acceptance
Might be worth updating an example since nothing today uses tag:acceptance
. I did a quick and dirty version of roachtest listAll
to enumerate all registered tags; pick any from list below,
roachtest listAll |grep tag|awk '{print $NF}'|sort -u|awk -F":" '{print $2}' |tr ',' '\n' |sort -u |sed -E "s/(owner)-.*/\1/g" |sort -u |tr '\n' ','
aws-weekly,awsdms,default,driver,fixtures,manual,orm,owner,pebble,pebble_nightly_write,pebble_nightly_ycsb,pebble_nightly_ycsb_race,quick,release_qualification,roachtest,smoketest,tool,weekly
f0cd82c
to
189cbad
Compare
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.
How did you find the missing one?
Good ol' side by side browser my branch vs master roachtest nightly.
Are we missing any?
$ ./bin/roachtest list tag:aws | wc -l
68
Numbers are in sync now
Dismissed @srosenberg from a discussion.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @herkolategan, @msbutler, @renatolabs, and @srosenberg)
pkg/cmd/roachtest/main.go
line 193 at r9 (raw file):
Previously, srosenberg (Stan Rosenberg) wrote…
Might be worth updating an example since nothing today uses
tag:acceptance
. I did a quick and dirty version ofroachtest listAll
to enumerate all registered tags; pick any from list below,roachtest listAll |grep tag|awk '{print $NF}'|sort -u|awk -F":" '{print $2}' |tr ',' '\n' |sort -u |sed -E "s/(owner)-.*/\1/g" |sort -u |tr '\n' ',' aws-weekly,awsdms,default,driver,fixtures,manual,orm,owner,pebble,pebble_nightly_write,pebble_nightly_ycsb,pebble_nightly_ycsb_race,quick,release_qualification,roachtest,smoketest,tool,weekly
Good idea. Done.
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.
Reviewed 1 of 11 files at r1, 1 of 1 files at r3, 1 of 6 files at r8, 2 of 8 files at r9, 50 of 50 files at r10, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @msbutler, @renatolabs, and @srosenberg)
@@ -210,6 +220,8 @@ Examples: | |||
} | |||
listCmd.Flags().BoolVar( | |||
&listBench, "bench", false, "list benchmarks instead of tests") | |||
listCmd.Flags().StringVar( | |||
&cloud, "cloud", cloud, "cloud provider to use (aws, azure, or gce)") |
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.
Not clear to me what this new parameter does 🤔
# isn't supported on AWS at time of writing. | ||
TESTS="awsdms|kv(0|95)|^ycsb|tpcc/(headroom/n4cpu16)|tpccbench/(nodes=3/cpu=16)|scbench/randomload/(nodes=3/ops=2000/conc=1)|backup/(KMS/AWS/n3cpu4)|restore/.*/aws" | ||
if [ -z "${FILTER}" ]; then | ||
FILTER="tag:aws" |
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.
🎉
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.
wahoo!!!
189cbad
to
f349f9c
Compare
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.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @herkolategan, @msbutler, @renatolabs, and @srosenberg)
pkg/cmd/roachtest/main.go
line 224 at r10 (raw file):
Previously, renatolabs (Renato Costa) wrote…
Not clear to me what this new parameter does 🤔
Brings consistency between run
and list
. A recent PR introduced a test (since patched( which caused a panic because we were running it on AWS; and the panic happened during test registration/MakeClusterSpec due to an invalid memory spec for AWS
Having the cloud here allows us to see what would happen if we list test after their registered with values other than "GCE". Allowed me to replicate the panic by just doing a list. Most people won't use this parameter, but it has value.
f349f9c
to
f9bd3f5
Compare
… tags. Today, tests are matched if they have any-of the specified tags. This patch introduces the ability to also match tests which have "all-of" specified tags, along with tag negation. This example will list all tests tagged with "aws" or with both "weekly" and "owner-test-eng" tags: "roachtest list tag:aws tag:weekly,owner-test-eng" An example of tag negation which would list all of the tests with tag "weekly" but not "aws": "roachtest list tag:weekly,!aws" Epic: none Fixes: cockroachdb#96655 Release note: None
…t" and "aws" tagged tests are run See cockroachdb#100605
f9bd3f5
to
85e005b
Compare
TFTR bors r=srosenberg,herkolategan |
Build succeeded: |
… tags.
oday, tests are matched if they have any of the specified tags. This patch introduces the ability to match tests which have all specified tags, whilst attempting to maintain backward compatibility.
Commits
1 - expand tag filtering (AND, !)
2 - convert
TestSpec.Tags
tomap[string]struct{}
3 - suppress TeamCity log statement
Epic: none
Fixes: #96655
Release note: None