Skip to content
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

spanconfigccl: fix tests under multitenancy #107760

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

rafiss
Copy link
Collaborator

@rafiss rafiss commented Jul 27, 2023

fixes #106818
fixes #106821
Release note: None

@rafiss rafiss requested a review from a team July 27, 2023 22:14
@rafiss rafiss requested a review from a team as a code owner July 27, 2023 22:14
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: Thanks!

Also, take a look at TestTODOTestTenantDisabled in case you can remove some files from the allowlist.

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rafiss)


pkg/ccl/spanconfigccl/spanconfigsqlwatcherccl/sqlwatcher_test.go line 290 at r1 (raw file):

	tc := testcluster.StartTestCluster(t, 1, base.TestClusterArgs{
		ServerArgs: base.TestServerArgs{
			DefaultTestTenant: base.TestTenantProbabilisticOnly,

nit: you can omit specifying DefaultTestTenant since "probabilistic only" is the default.


pkg/ccl/spanconfigccl/spanconfigsqlwatcherccl/sqlwatcher_test.go line 308 at r1 (raw file):

	noopCheckpointDuration := 100 * time.Millisecond
	sqlWatcher := spanconfigsqlwatcher.New(
		ts.TenantOrServer().Codec(),

nit: FYI TenantOrServer() is being renamed to ApplicationLayer() over in #107612.

Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*at TestTODOTestTenantDisabled linter.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rafiss)

@rafiss rafiss force-pushed the deflake-spanconfig-tests branch from 44c8346 to d57d663 Compare July 28, 2023 01:00
Copy link
Collaborator Author

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, nothing in spanconfigccl is excluded from that linter at all, so i'm not sure why the linter was passing before. tftr!

bors r=yuzefovich

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @yuzefovich)


pkg/ccl/spanconfigccl/spanconfigsqlwatcherccl/sqlwatcher_test.go line 290 at r1 (raw file):

Previously, yuzefovich (Yahor Yuzefovich) wrote…

nit: you can omit specifying DefaultTestTenant since "probabilistic only" is the default.

done

@rafiss rafiss added the backport-23.1.x Flags PRs that need to be backported to 23.1 label Jul 28, 2023
@rafiss
Copy link
Collaborator Author

rafiss commented Jul 28, 2023

ah i see #107612 is merging right now

bors r-

@craig
Copy link
Contributor

craig bot commented Jul 28, 2023

Canceled.

@@ -119,7 +113,8 @@ func TestDataDriven(t *testing.T) {
var dbName, tbName string
d.ScanArgs(t, "database", &dbName)
d.ScanArgs(t, "table", &tbName)
objID = tenant.LookupTableByName(ctx, dbName, tbName).GetID()
tbl := tenant.LookupTableByName(ctx, dbName, tbName)
objID = tbl.GetID()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Jake introduced a method .QueryTableID() which might be relevant here.

@rafiss rafiss force-pushed the deflake-spanconfig-tests branch from d57d663 to ee028ba Compare July 28, 2023 03:39
@rafiss
Copy link
Collaborator Author

rafiss commented Jul 28, 2023

bors r=yuzefovich

@craig
Copy link
Contributor

craig bot commented Jul 28, 2023

This PR was included in a batch that timed out, it will be automatically retried

@craig
Copy link
Contributor

craig bot commented Jul 28, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Jul 28, 2023

Build succeeded:

@craig craig bot merged commit 167da65 into cockroachdb:master Jul 28, 2023
@blathers-crl
Copy link

blathers-crl bot commented Jul 28, 2023

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from ee028ba to blathers/backport-release-23.1-107760: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 23.1.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@yuzefovich
Copy link
Member

hm, nothing in spanconfigccl is excluded from that linter at all, so i'm not sure why the linter was passing before.

The linter is specific to base.TODOTestTenantDisabled, and in this case we had base.TestDoesNotWorkWithSecondaryTenantsButWeDontKnowWhyYet. So all good.

@rafiss rafiss deleted the deflake-spanconfig-tests branch July 28, 2023 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.1.x Flags PRs that need to be backported to 23.1
Projects
None yet
4 participants