Skip to content

Conversation

@knz
Copy link
Contributor

@knz knz commented Sep 5, 2023

This PR contains the test improvements prerequisite to #110001.
Epic: CRDB-18499

@knz knz requested a review from stevendanna September 5, 2023 10:44
@knz knz requested a review from a team as a code owner September 5, 2023 10:44
@knz knz requested a review from a team September 5, 2023 10:44
@knz knz requested review from a team as code owners September 5, 2023 10:44
@knz knz requested review from herkolategan, michae2 and srosenberg and removed request for a team September 5, 2023 10:44
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@knz knz force-pushed the 20230905-fix-tenant-tests branch from 0908869 to da39f62 Compare September 5, 2023 11:01
@knz knz requested a review from a team as a code owner September 5, 2023 11:01
@knz knz force-pushed the 20230905-fix-tenant-tests branch from da39f62 to a958297 Compare September 5, 2023 11:31
@knz knz requested a review from a team as a code owner September 5, 2023 11:31
@knz knz force-pushed the 20230905-fix-tenant-tests branch from a958297 to 4a88e30 Compare September 5, 2023 13:06
@knz knz requested review from a team and abarganier and removed request for a team September 5, 2023 13:06
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.

I have some nits.

Copy link
Collaborator

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

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

I didn't add much on top of Yahor's review. But there is one required change in my opinion.

Huge thanks for continuing to drive this forward.

knz added 7 commits September 8, 2023 15:32
Release note: None
Release note: None
Release note: None
The dialer for a given SQL layer dials across SQL servers using
instance IDs.

Release note: None
knz added 7 commits September 8, 2023 15:39
and link it to follow-up issue cockroachdb#110014.

Release note: None
This incomplete configuration was noticed by `TestStatusGetFiles` once
enabled to run over secondary tenants. This extra test coverage is
enabled in the subsequent commit.

Release note: None
knz added 2 commits September 8, 2023 16:25
Release note: None
This way the optimizing call to `TestingRestart` on the cap watcher is
performed in all tests that use this API.

Release note: None
@knz knz force-pushed the 20230905-fix-tenant-tests branch from e73b28b to e3461bc Compare September 8, 2023 14:27
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:

Reviewed 4 of 4 files at r2, 13 of 13 files at r3, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @abarganier, @herkolategan, @michae2, @srosenberg, and @stevendanna)

Copy link
Contributor

@abarganier abarganier left a comment

Choose a reason for hiding this comment

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

LGTM, I appreciate the clarity that's added from this overhaul.

s := serverutils.StartServerOnly(t, base.TestServerArgs{})
defer s.Stopper().Stop(ctx)
srv := serverutils.StartServerOnly(t, base.TestServerArgs{
DefaultTestTenant: base.TestIsForStuffThatShouldWorkWithSecondaryTenantsButDoesntYet(110002),
Copy link
Contributor

Choose a reason for hiding this comment

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

base.TestIsForStuffThatShouldWorkWithSecondaryTenantsButDoesntYet(110002)

☠️ 😂

baseCfg.SpanConfigsDisabled = kvServerCfg.BaseConfig.SpanConfigsDisabled
baseCfg.EnableDemoLoginEndpoint = kvServerCfg.BaseConfig.EnableDemoLoginEndpoint
baseCfg.DefaultZoneConfig = kvServerCfg.BaseConfig.DefaultZoneConfig
baseCfg.HeapProfileDirName = kvServerCfg.BaseConfig.HeapProfileDirName
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: does this impact tests? Or is it just some cleanup along the way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is exercised in tests; its lack was noticed by a failure in #110001.

@knz
Copy link
Contributor Author

knz commented Sep 11, 2023

TFYRs!

bors r=stevendanna,yuzefovich,abargainier

@craig
Copy link
Contributor

craig bot commented Sep 11, 2023

Build succeeded:

@craig craig bot merged commit d773874 into cockroachdb:master Sep 11, 2023
@knz knz deleted the 20230905-fix-tenant-tests branch September 11, 2023 01:34
craig bot pushed a commit that referenced this pull request Sep 11, 2023
110001: serverutils: redirect the implicit `ApplicationLayerInterface` properly r=stevendanna a=knz

All commits but the last 3 are from #110008.
Epic: CRDB-18499

Prior to this patch, the *implicit* `ApplicationLayerInterface`
implementation inside `TestServerInterface` was redirecting to
`SystemLayer()`. This was confusing, likely the source of bugs, and
resulted in insufficient test coverage.

This commit fixes it.

followup issues identified thanks to this work:
- actual bug: #110003
- possible bug: #110002
- possible bug: #110007
- possible bug: #110012
- feature gap: #110009
- feature gap: #110018
- feature gap: #110019
- feature gap: #110020
- feature gap: #110022
- feature gap: #110023
- feature gap: #110024

Co-authored-by: Raphael 'kena' Poss <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants