Skip to content

jobsccl: remove some uses of TODOTestTenantDisabled, simplify test code#106928

Merged
craig[bot] merged 5 commits intocockroachdb:masterfrom
knz:20230717-misc-ts
Jul 19, 2023
Merged

jobsccl: remove some uses of TODOTestTenantDisabled, simplify test code#106928
craig[bot] merged 5 commits intocockroachdb:masterfrom
knz:20230717-misc-ts

Conversation

@knz
Copy link
Copy Markdown
Contributor

@knz knz commented Jul 17, 2023

First commits from #107135.

Epic: CRDB-18499
Informs #76378.

@knz knz requested review from a team as code owners July 17, 2023 17:18
@knz knz requested review from a team, ericharmeling, rhu713, stevendanna and yuzefovich and removed request for a team July 17, 2023 17:18
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@knz knz force-pushed the 20230717-misc-ts branch from 361a5dd to 1bd0837 Compare July 17, 2023 17:50
@knz knz requested review from a team as code owners July 17, 2023 17:50
@knz knz requested review from herkolategan and srosenberg and removed request for a team July 17, 2023 17:50
@knz knz force-pushed the 20230717-misc-ts branch from 1bd0837 to e07ec11 Compare July 17, 2023 18:17
Copy link
Copy Markdown
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 2 of 2 files at r1, 1 of 1 files at r2, 4 of 4 files at r3, 6 of 6 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @ericharmeling, @herkolategan, @knz, @rhu713, @srosenberg, and @stevendanna)


pkg/server/systemconfigwatcher/systemconfigwatchertest/test_system_config_watcher.go line 43 at r3 (raw file):

// TestSystemConfigWatcher is a test which exercises the end-to-end integration
// of the systemconfigwatcher. It exists in this subpackage so that it can be
// run to exercise secondary tenants, which are ccl-only.

Should we refactor this testing helper to be a proper test itself, which enables the ccl features and runs both system and secondary tenants?


pkg/testutils/serverutils/test_tenant_shim.go line 117 at r4 (raw file):

	// InternalExecutor returns a *sql.InternalExecutor as an interface{} (which
	// also implements insql.InternalExecutor if the test cannot depend on sql).

nit: s/insql/isql/.


pkg/server/admin_test.go line 145 at r4 (raw file):

	s, _, _ := serverutils.StartServer(t, base.TestServerArgs{
		// Disable the default test tenant for now as this tests fails with
		// it enabled. Tracked with #81590.

Seems like the last commit closes #81590.

@knz knz force-pushed the 20230717-misc-ts branch from e07ec11 to 7955b32 Compare July 18, 2023 09:25
Copy link
Copy Markdown
Contributor Author

@knz knz left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @ericharmeling, @herkolategan, @rhu713, @srosenberg, @stevendanna, and @yuzefovich)


pkg/server/systemconfigwatcher/systemconfigwatchertest/test_system_config_watcher.go line 43 at r3 (raw file):

Previously, yuzefovich (Yahor Yuzefovich) wrote…

Should we refactor this testing helper to be a proper test itself, which enables the ccl features and runs both system and secondary tenants?

Good idea, filed #107058 to track.


pkg/testutils/serverutils/test_tenant_shim.go line 117 at r4 (raw file):

Previously, yuzefovich (Yahor Yuzefovich) wrote…

nit: s/insql/isql/.

Fixed.


pkg/server/admin_test.go line 145 at r4 (raw file):

Previously, yuzefovich (Yahor Yuzefovich) wrote…

Seems like the last commit closes #81590.

Sadly it does not -- this only covers the debug interface, but all the SQL introspection APIs (get db details etc) are not done yet.

@knz
Copy link
Copy Markdown
Contributor Author

knz commented Jul 18, 2023

TFYR

bors r=yuzefovich

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 18, 2023

Build failed:

@knz knz changed the title server,jobsccl: remove some uses of TODOTestTenantDisabled, simplify test code jobsccl: remove some uses of TODOTestTenantDisabled, simplify test code Jul 18, 2023
@knz knz force-pushed the 20230717-misc-ts branch from 7955b32 to e0db526 Compare July 18, 2023 23:13
@knz
Copy link
Copy Markdown
Contributor Author

knz commented Jul 18, 2023

bors r=yuzefovich

@knz
Copy link
Copy Markdown
Contributor Author

knz commented Jul 18, 2023

bors r-

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 18, 2023

Canceled.

@knz knz force-pushed the 20230717-misc-ts branch from e0db526 to 092ba9c Compare July 19, 2023 00:44
@knz knz requested a review from a team July 19, 2023 00:44
@knz knz requested review from a team as code owners July 19, 2023 00:44
@knz knz force-pushed the 20230717-misc-ts branch from 092ba9c to b1d80c3 Compare July 19, 2023 00:54
@knz knz force-pushed the 20230717-misc-ts branch from b1d80c3 to def1190 Compare July 19, 2023 10:04
@knz knz requested a review from a team as a code owner July 19, 2023 10:04
@knz knz requested a review from itsbilal July 19, 2023 10:04
@knz
Copy link
Copy Markdown
Contributor Author

knz commented Jul 19, 2023

bors r=yuzefovich

knz added 3 commits July 19, 2023 12:42
New sub-packages:

- `storage_api`: unit tests for API endpoints specific
  to the KV/storage layer.

- `application_api`: unit tests for API endpoints valid for
  application servers, including for secondary tenants.

- `privchecker`: SQL authorization interface for API handlers.
  (previously: `adminPrivilegeChecker`)

- `authserver`: HTTP/RPC authentication code.
  (previously: `authenticationServer`)

- `srverrors`: error objects suitable for return from API handlers.

- `srvtestutils`: common helpers for test code.

Release note: None
This also removes `TODOTestTenantDisabled` since the tests properly
exercise secondary tenants already.

Release note: None
@knz knz force-pushed the 20230717-misc-ts branch from def1190 to d56f81b Compare July 19, 2023 10:43
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 19, 2023

Canceled.

@knz
Copy link
Copy Markdown
Contributor Author

knz commented Jul 19, 2023

bors r=yuzefovich

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 19, 2023

Timed out.

@knz knz requested a review from a team as a code owner July 19, 2023 13:53
@knz
Copy link
Copy Markdown
Contributor Author

knz commented Jul 19, 2023

bors r=yuzefovich

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 19, 2023

Build succeeded:

@craig craig bot merged commit ab8fac2 into cockroachdb:master Jul 19, 2023
@knz knz deleted the 20230717-misc-ts branch July 20, 2023 07:39
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.

3 participants