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

testutils: add DeploymentMode method to ApplicationLayerInterface #140662

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

shubhamdhama
Copy link
Contributor

@shubhamdhama shubhamdhama commented Feb 7, 2025

Certain tests need to determine the deployment mode of the test
server—whether it's single-tenant, shared-process, or external-process.
While this can be queried via SQL, a dedicated helper method improves
usability.

This commit adds DeploymentMode to ApplicationLayerInterface to provide
a simpler way to retrieve this information.

Informs: #138912
Epic: CRDB-38970
Release note: None

@shubhamdhama shubhamdhama requested review from a team as code owners February 7, 2025 04:36
@shubhamdhama shubhamdhama requested review from herkolategan, srosenberg and stevendanna and removed request for a team February 7, 2025 04:36
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@@ -910,6 +910,9 @@ type testTenant struct {
// pgPreServer handles SQL connections prior to routing them to a
// specific tenant.
pgPreServer *pgwire.PreServeConnHandler
// deploymentMode specifies the tenant's deployment mode.
// Allowed values: ExternalProcess or SharedProcess.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The allowed value list is a bit off. Doesn't include: SingleTenant

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IIUC, testTenant and testServer implement ApplicationInterface, with testTenant used for secondary tenants and testServer for a single tenant. That's why I didn't include SingleTenant here.

@shubhamdhama shubhamdhama force-pushed the add-api-to-app-interface branch 2 times, most recently from 1493dc9 to 46fdfca Compare February 10, 2025 15:19
Certain tests need to determine the deployment mode of the test
server—whether it's single-tenant, shared-process, or external-process.
While this can be queried via SQL, a dedicated helper method improves
usability.

This commit adds `DeploymentMode` to `ApplicationLayerInterface` to provide
a simpler way to retrieve this information.

Informs: cockroachdb#138912
Epic: CRDB-38970
Release note: None
@shubhamdhama shubhamdhama force-pushed the add-api-to-app-interface branch from 46fdfca to 9413682 Compare February 13, 2025 10:02
@shubhamdhama
Copy link
Contributor Author

Thanks for the reviews!

bors r=stevendanna,herkolategan

@craig
Copy link
Contributor

craig bot commented Feb 13, 2025

@craig craig bot merged commit 83b38f5 into cockroachdb:master Feb 13, 2025
24 checks passed
@shubhamdhama shubhamdhama deleted the add-api-to-app-interface branch March 1, 2025 10:44
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.

4 participants