-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: compile cockroach-short with --crdb_test and use in sqlsmith #86625
Conversation
I'm not quite sure how to test the whole pipeline as well as whether this is the right approach, so I'm open to any suggestions. |
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.
Looks good modulo the naming asymmetry. Thanks for sending this PR! I am excited to see what else we might find by running other tests with assertions enabled.
Reviewed all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @renatolabs, @rickystewart, and @yuzefovich)
build/teamcity/cockroach/nightlies/roachtest_compile_bits.sh
line 8 at r1 (raw file):
//pkg/cmd/cockroach //pkg/cmd/workload //pkg/cmd/roachtest \ //c-deps:libgeos bazel build --config crosslinux --config ci -c opt //pkg/cmd/cockroach-short --crdb_test
Could we maybe call it something else to denote that this type of binary is compiled with runtime assertions? E.g., cockroach-short-ea
(ea
for "enable assertions"); cockroach-short-crdb_test
seems somewhat redundant :)
Also, it would be nice to keep the symmetry between cockroach
(cockroach-ea
) and cockroach-short
(cockroach-short-ea
). At some point, we might want to use cockroach-short
without assertions, for some of the tests. (None of the tests explicitly use the Console; I think it's mainly a convenience feature in case you'd like to attach to it while a long-running tests is executing, but I am not entirely sure.) @tbg is our anthropologist, so I'll let him chime in :)
5796d7d
to
1628a15
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.
TFTRs!
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @renatolabs, @rickystewart, and @tbg)
build/teamcity/cockroach/nightlies/roachtest_compile_bits.sh
line 8 at r1 (raw file):
Previously, srosenberg (Stan Rosenberg) wrote…
Could we maybe call it something else to denote that this type of binary is compiled with runtime assertions? E.g.,
cockroach-short-ea
(ea
for "enable assertions");cockroach-short-crdb_test
seems somewhat redundant :)Also, it would be nice to keep the symmetry between
cockroach
(cockroach-ea
) andcockroach-short
(cockroach-short-ea
). At some point, we might want to usecockroach-short
without assertions, for some of the tests. (None of the tests explicitly use the Console; I think it's mainly a convenience feature in case you'd like to attach to it while a long-running tests is executing, but I am not entirely sure.) @tbg is our anthropologist, so I'll let him chime in :)
Renamed. I didn't find a way to do that by asking the bazel directly to store the compiled binary at a different name - is there a way? Maybe @rickystewart knows.
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! A suggestion: could move the code you added to sqlsmith.go
to a place where it can be reused by other tests, e.g.:
c.MaybeUseTestBuild(t, 0.5)
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @renatolabs, @rickystewart, @srosenberg, @tbg, and @yuzefovich)
pkg/cmd/roachtest/tests/sqlsmith.go
line 102 at r1 (raw file):
c.Put(ctx, t.Cockroach(), "./cockroach") } else { t.Status("using cockroach-short binary compiled with --crdb_test build tag")
Could we check if a cockroach-short binary is present as well? When roachtest
is called without the cockroach-short option, this message will be misleading, as we'll be using the standard cockroach binary. We could let cockroachShort
be empty if the flag is not passed and check for its value here.
Nah, the binary name is determined by the |
1628a15
to
287d511
Compare
This commit adds another step to the nightly roachtest invocation to compile `cockroach-short` binary with `--crdb_test` build tag. Then it also adds plumbing throughout the roachtest infrastructure to expose that newly-compiled binary which is now used in 50% cases in the sqlsmith roachtest. Release justification: testing-only change. Release note: None
287d511
to
9abc884
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.
Extracted a helper for reuse.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @renatolabs, @rickystewart, @srosenberg, and @tbg)
pkg/cmd/roachtest/tests/sqlsmith.go
line 102 at r1 (raw file):
Previously, renatolabs (Renato Costa) wrote…
Could we check if a cockroach-short binary is present as well? When
roachtest
is called without the cockroach-short option, this message will be misleading, as we'll be using the standard cockroach binary. We could letcockroachShort
be empty if the flag is not passed and check for its value here.
Good point, 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.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @renatolabs, @rickystewart, @srosenberg, and @tbg)
TFTRs! bors r+ |
Build failed (retrying...): |
Build failed (retrying...): |
Build failed (retrying...): |
Build failed (retrying...): |
Build failed (retrying...): |
Build failed: |
bors r+ |
Build failed (retrying...): |
Build failed (retrying...): |
Build succeeded: |
Fixes a regression introduced by cockroachdb#86625. Release justification: fix roachtest nightly (on master) Release note: None
86834: sql/opt: add session setting to disable stats forecast use in optimizer r=rytaft a=michae2 Add a new session setting, `optimizer_use_forecasts`, which can be used to disable forecast usage in the optimizer. Forecasts will still be generated in the stats cache (this will be controlled by a different setting). Assists: #86350 Release justification: Low-risk update to new functionality. Release note (sql change): This commit adds a new session setting, `optimizer_use_forecasts`, which can be set to false to disable usage of statistics forecasts when optimizing a query. 86920: roachprod{,-stress}: let roachprod-stress use roachprod library r=srosenberg a=healthy-pod This patch migrates roachprod-stress from using the roachprod binary to using the roachprod library. Release justification: Non-production code changes Release note: None 86954: util/mon: remove nameWithPointer to reduce allocations r=yuzefovich a=yuzefovich This field was added in order to help us track down some of the memory leaks which we have already found, and the field didn't turn out to be that useful. When it was introduced, the implications on the increase in allocations were unknown, and now I don't think the field is worth it. ``` name old time/op new time/op delta FlowSetup/vectorize=true/distribute=true-24 168µs ± 5% 164µs ± 4% -2.33% (p=0.007 n=19+20) FlowSetup/vectorize=true/distribute=false-24 167µs ± 6% 164µs ± 6% ~ (p=0.060 n=20+20) FlowSetup/vectorize=false/distribute=true-24 163µs ± 4% 161µs ± 7% ~ (p=0.057 n=19+20) FlowSetup/vectorize=false/distribute=false-24 161µs ± 6% 159µs ± 5% ~ (p=0.309 n=19+20) name old alloc/op new alloc/op delta FlowSetup/vectorize=true/distribute=true-24 19.6kB ± 8% 19.0kB ± 8% -2.62% (p=0.001 n=19+18) FlowSetup/vectorize=true/distribute=false-24 18.2kB ± 1% 17.7kB ± 1% -2.56% (p=0.000 n=17+16) FlowSetup/vectorize=false/distribute=true-24 25.8kB ± 2% 25.4kB ± 0% -1.44% (p=0.000 n=16+16) FlowSetup/vectorize=false/distribute=false-24 24.7kB ± 0% 24.4kB ± 1% -1.36% (p=0.000 n=16+16) name old allocs/op new allocs/op delta FlowSetup/vectorize=true/distribute=true-24 218 ± 2% 205 ± 3% -5.64% (p=0.000 n=19+19) FlowSetup/vectorize=true/distribute=false-24 208 ± 1% 197 ± 3% -5.63% (p=0.000 n=19+19) FlowSetup/vectorize=false/distribute=true-24 206 ± 0% 197 ± 0% -4.40% (p=0.000 n=16+16) FlowSetup/vectorize=false/distribute=false-24 197 ± 0% 188 ± 0% -4.54% (p=0.000 n=16+16) ``` Release justification: low-risk cleanup. Release note: None 86956: roachtest: fix unintended exit when --cockroach-short is passed r=srosenberg a=srosenberg Fixes a regression introduced by #86625. Release justification: fix roachtest nightly (on master) Release note: None Co-authored-by: Michael Erickson <[email protected]> Co-authored-by: healthy-pod <[email protected]> Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Stan Rosenberg <[email protected]>
This commit adds another step to the nightly roachtest invocation to
compile
cockroach-short
binary with--crdb_test
build tag. Then italso adds plumbing throughout the roachtest infrastructure to expose
that newly-compiled binary which is now used in 50% cases in the sqlsmith
roachtest.
Fixes: #83186.
Release justification: testing-only change.
Release note: None