-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
serverutils: refactor the server test APIs #107058
Labels
A-multitenancy
Related to multi-tenancy
A-testing
Testing tools and infrastructure
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
db-cy-23
T-multitenant
Issues owned by the multi-tenant virtual team
Comments
knz
added
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
A-multitenancy
Related to multi-tenancy
T-multitenant
Issues owned by the multi-tenant virtual team
A-testing
Testing tools and infrastructure
labels
Jul 18, 2023
This was referenced Jul 26, 2023
craig bot
pushed a commit
that referenced
this issue
Jul 28, 2023
107612: serverutils: clean up some interfaces r=knz a=knz Epic: CRDB-18499 Part of solving #107058. Informs #106772. In this commit: - `TestTenantInterface` renamed to `ApplicationLayerInterface`. - `TestServerInterface` split into: - `StorageLayerInterface` containing most of the methods previously in `TestServerInterface`. - `TenantControlInterface` with just the methods relating to starting the service for secondary tenants. - Relevant methods moved from `TestServerInterface` to `ApplicationLayerInterface`: - `ServingSQLAddr()` - renamed to `AdvSQLAddr()` - `RPCAddr()` - `LeaseManager()` - `DistSenderI()` - `MigrationServer()` - `SetDistSQLSpanResolver()` - `CollectionFactory()` - `SystemTableIDResolver()` - Removed `HostSQLAddr()` - use `.SystemLayer().AdvSQLAddr()` instead. - `AdvSQLAddr()` (previously `ServingSQLAddr()`) was simplified to always return the advertised SQL address for the current layer. - Updated comments/docstrings for the interfaces. Release note: None Co-authored-by: Raphael 'kena' Poss <[email protected]>
craig bot
pushed a commit
that referenced
this issue
Jul 28, 2023
107391: roachtest: include link to testeng grafana in issue posts r=smg260,tbg a=annrpom This adds a link, populated with relevant cluster name and test timeframe, to the testeng grafana instance for failed roachtests. Fixes: #105894 Release note: None 107659: serverutils: provide SQLConn/SQLConnE in ApplicationLayerInterface r=stevendanna a=knz Fixes #107672. Part of solving #107058. Informs #106772. Epic: CRDB-18499 107697: rpc: avoid crash in newPeer r=erikgrinaker a=tbg It was previously possible to make a new peer while the old one was in the middle of being deleted, which caused a crash due to to acquiring child metrics when they still existed. Luckily, this is easy enough to fix: just remove some premature optimization where I had tried to be too clever. Fixes #105335. Epic: CRDB-21710 Release note: None (bug never released) 107721: asim: skip TestAllocatorSimulatorDeterministic and example_fulldisk r=wenyihu6 a=wenyihu6 We found some non-deterministic behavior in the allocator simulator (see #105904 for more details). For now, we are skipping these potentially flaky tests. Release Note: None Epic: None 107728: persistedsqlstats: specify background qos for compaction job r=xinhaoz a=xinhaoz The compaction job can be an expensive operation so we should de-prioritize it with the `UserLow` qos setting. Fixes: #99949 Release note: None 107750: ui: fix app = empty string filter on stmts page r=xinhaoz a=xinhaoz The filter on app name = empty string was not working on the stmts page. This was due to the fact that we use (unset) as the option in the filter to represent selecting the empty string app name. However when filtering statements, the empty string app name on the stmt was not changed accordingly. this commit fixes this and also adds testing for the unset case. Epic: none Fixes: #107748 Release note (bug fix): Filter on stmts page works for app name = empty string (represented as 'unset'). https://www.loom.com/share/2fee4f0fb7b04208803e0dac1d9694ab?sid=5cabecf9-1c2a-406b-89a8-b378ed07d329 107753: backupccl: deflake TestBackupAndRestoreJobDescription r=stevendanna a=adityamaru This change sorts the jobs based on when they were created to ensure we get a stable sort of job descriptions. Fixes: #107684 Release note: None Co-authored-by: Annie Pompa <[email protected]> Co-authored-by: Raphael 'kena' Poss <[email protected]> Co-authored-by: Tobias Grieger <[email protected]> Co-authored-by: wenyihu6 <[email protected]> Co-authored-by: Xin Hao Zhang <[email protected]> Co-authored-by: adityamaru <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-multitenancy
Related to multi-tenancy
A-testing
Testing tools and infrastructure
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
db-cy-23
T-multitenant
Issues owned by the multi-tenant virtual team
Context
As part of our work on #76378 we are observing a pattern:
Meanwhile, if the test needs explicit access to the storage layer, it is cumbersome:
Description of problem
There are two shorcomings with this structure:
TenantOrServer()
first.And most importantly:
Solution outline
More explicit testserver APIs
At the outset, we should make the "application" vs "storage" layer separation more clear. That is:
TestServerInterface
inherit fromTestTenantInterface
any moreStorageLayer() TestTenantInterface
insideTestServerInterface
so that a test can spell out explicitly that it wants access to the storage layer.TenantOrServer()
toApplicationLayer()
.SQLConn() *goSQL.DB
method toTestTenantInterface
, it's been sorely missing!StartServer
are equivalent to.ApplicationLayer().SQLConn()
and.ApplicationLayer().DB()
, for clarity.TestTenantInterface
toTestClientInterface
.This would already clarify a great deal of tests. But it would still limit each test run to either test one or the other.
Helper to automate working with test servers
To increase test coverage, we should invert control of
StartServer
, that is deprecateand instead introduce:
So a test would change from:
to:
Once we have this API in place, we can make the sub-test run for both interfaces:
Jira issue: CRDB-29864
The text was updated successfully, but these errors were encountered: