sql: several preliminary changes to making tests work with secondary tenants#155783
Conversation
|
Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
88deb14 to
ddc445c
Compare
mw5h
left a comment
There was a problem hiding this comment.
@mw5h reviewed 5 of 7 files at r1, 29 of 31 files at r2, 5 of 5 files at r3, 32 of 32 files at r4, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @yuzefovich)
pkg/sql/catalog/lease/lease_internal_test.go line 1911 at r4 (raw file):
}) go func() { }()
Wut?
Code quote:
go func() {
}()ddc445c to
3eb6bb1
Compare
yuzefovich
left a comment
There was a problem hiding this comment.
TFTR!
bors r+
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @mw5h)
pkg/sql/catalog/lease/lease_internal_test.go line 1911 at r4 (raw file):
Previously, mw5h (Matt White) wrote…
Wut?
Haha, that was my reaction as well 😆
155783: sql: several preliminary changes to making tests work with secondary tenants r=yuzefovich a=yuzefovich This PR contains several commits which audit tests in `pkg/sql` directory to ensure the right JobRegistry, codec, LeaseManager, and PGUrl are used. Almost all were pretty mechanical changes. Note that no new tests are enabled with secondary tenants yet - this will be done separately. Epic: CRDB-48945 156002: workload/tpch: add a couple of missed values for fixtures generation r=yuzefovich a=yuzefovich When we added the fixtures generation of TPCH spec, we forgot a couple of values - one for "priorities" and one for "containers". This commit fixes that omission. In particular, missing priority value made us return 4 rows instead of 5 for Q4, and the expectation has been adjusted accordingly. Note that this omission was exposed via a roachtest that uses correctly generated fixtures of SF 100. Fixes: #155834. Release note: None 156008: Revert "publish-artifacts: change GCS latest key prefix for Workload … r=rail a=williamchoe3 Original PR: #155789 Reverting to split into 2 commits for easier backport Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com> Co-authored-by: William Choe <williamchoe3@gmail.com>
|
Build failed (retrying...): |
|
Merge conflict. |
One of the common modifications we need to make for tests to work with secondary tenants is using the JobRegistry of the ApplicationLayer (as opposed to the one belonging to the system tenant). This commit audits all tests in `pkg/sql` directory to ensure the right registry is used. Note that tests still might need further modifications. Release note: None
One of the common modifications we need to make for tests to work with secondary tenants is using the right `keys.SQLCodec` (as opposed to the one belonging to the system tenant). This commit audits all tests in `pkg/sql` directory to ensure that the right codec is passed. Note that tests still might need further modifications. Also note that tests that don't start a test server / a test cluster weren't touched (since they don't benefit from the tenant randomization behavior). Release note: None
This commit audits all tests in `pkg/sql` directory to ensure the LeaseManager of the application layer is used. Note that tests still might need further modifications. Release note: None
This commit replaces almost all usages of `pgurlutils` package within the `sql` directory in tests with the corresponding `PGUrl` call on the `ApplicationLayerInterface` since I found this to be a necessary change in several tests when making them work with secondary tenants. Perhaps this wasn't necessary, but it seems cleaner and more consistent this way. Release note: None
3eb6bb1 to
2d2edcb
Compare
|
bors r+ |
|
Build succeeded: |
This PR contains several commits which audit tests in
pkg/sqldirectory to ensure the right JobRegistry, codec, LeaseManager, and PGUrl are used. Almost all were pretty mechanical changes. Note that no new tests are enabled with secondary tenants yet - this will be done separately.Epic: CRDB-48945