-
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
tenant: add apiv2 support for sql-over-http #91323
tenant: add apiv2 support for sql-over-http #91323
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls add "informs #80789 " in the PR description thx
Reviewed 12 of 12 files at r1, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @dhartunian)
061264e
to
7065d44
Compare
91081: ui: migrate statement diagnostics requests to use sql-over-http endpoint r=THardy98 a=THardy98 Part of: #89429 Addresses: #90273, #90274, #90275 Blocked from resolving by #80789 DB-Console Demo: https://www.loom.com/share/d74c02eb3dfb41fc913577d0e8992441 CC-Console Demo: https://www.loom.com/share/2adba8a53b8c48ac9f031e4481f284cf This change migrates the existing statement diagnostics requests to use the sql-over-http endpoint on our apiV2, making these requests tenant-scoped once the sql-over-http endpoint is scoped to tenants (this should be the case when #91323 is completed). 91534: lint: remove Golint r=yuzefovich a=yuzefovich This commit removes `TestGolint` linter as well as all mentions of `golint` I could find. The rationale is that - the linter is no longer maintained - is partially duplicated with the `staticcheck` - due to a recent change in `gcexportdata.Find`, if we bump some dependencies, it takes on the order of an hour when run via bazel, and we'd need to fork `golint` to go around that. Epic: None Release note: None 91626: kvstreamer: improve the behavior with very low budget r=yuzefovich a=yuzefovich This commit makes it so that the streamer tries a bit harder to not hit its low budget limit in `Enqueue`. Previously, due to some of the internal state being reused across different `Enqueue` batches (in particular, the truncation helper as well as some things in the results buffer), the streamer's budget might be insufficient to account for the newly-enqueued requests, and we would error out. This commit makes it so that - if the budget limit is reached - we first discard the overhead (freeing up some budget) and then try to consume the requests' footprint again. This shouldn't be a big deal with reasonably large workmem limits, but we have seen some problems when it is on the order of 100KiB or less. Fixes: #91587. Release note: None 91662: multi-tenant: Bump uninitialized storage cluster version r=knz a=ajstorm Previously, in cases where the version value in system.tenant_settings was uninitialized, we assumed that that the version was 22.1. With the change of the build tag to 23.1, we need to adjust the previous version to 22.1.76. This will need one more bump when we finally mint the 22.2 version number in master. Resolves: #91589 Release note: None Co-authored-by: Thomas Hardy <[email protected]> Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Adam Storm <[email protected]>
This commit adds partial support for the `/api/v2` HTTP server on tenants. Currently, we *only* support the SQL endpoint since this functionality is needed by newer DB Console features. The API V2 Server initialization no longer relies on the global `Server` object, and only requires a `SQLServer` instead which makes it easier to play nicely with tenants. However, we still have the problem of incompatible status and admin servers which are in use on other endpoints. Future work will unify the tenant scoped versions of these servers and allow them to be used here, enabling full API V2 compatibility on tenants. Release note (ops change): sql tenants now support the HTTP endpoint under `/api/v2/sql` which allows the caller to execute an HTTP request containing SQL statements to execute. The JSON response contains the results. This endpoints works identically as on a non-tenant server, except that it naturally scopes to the target tenant for SQL execution. Epic: CRDB-17356
7065d44
to
cb938ed
Compare
Part of: cockroachdb#89429 Addresses: cockroachdb#90272 (blocked from resolving by cockroachdb#80789) This change migrates the existing `/events` request to use the sql-over-http endpoint on apiV2, making this request tenant-scoped once the sql-over-http endpoint is scoped to tenants (this should be the case when cockroachdb#91323 is completed). Release note: None
bors r=knz |
Build succeeded: |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from cb938ed to blathers/backport-release-22.2-91323: 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 22.2.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
It appears that the linter on Github CI complains about a change in this PR:
|
Thanks @yuzefovich I've filed a fix: #91840 |
Part of: cockroachdb#89429 Addresses: cockroachdb#90272 (blocked from resolving by cockroachdb#80789) This change migrates the existing `/events` request to use the sql-over-http endpoint on apiV2, making this request tenant-scoped once the sql-over-http endpoint is scoped to tenants (this should be the case when cockroachdb#91323 is completed). Release note: None
Part of: cockroachdb#89429 Addresses: cockroachdb#90272 (blocked from resolving by cockroachdb#80789) This change migrates the existing `/events` request to use the sql-over-http endpoint on apiV2, making this request tenant-scoped once the sql-over-http endpoint is scoped to tenants (this should be the case when cockroachdb#91323 is completed). Release note: None
91745: ui: move events endpoint to use sql-over-http r=THardy98 a=THardy98 Part of: #89429 Addresses: #90272 (blocked from resolving by #80789) Demo (DB-Console only): https://www.loom.com/share/bb67044a8560407fb703af2a6bbb2d9a This change migrates the existing `/events` request to use the sql-over-http endpoint on apiV2, making this request tenant-scoped once the sql-over-http endpoint is scoped to tenants (this should be the case when #91323 is completed). Release note: None Co-authored-by: Thomas Hardy <[email protected]>
This commit adds partial support for the
/api/v2
HTTP server on tenants. Currently, we only support the SQL endpoint since this functionality is needed by newer DB Console features.The API V2 Server initialization no longer relies on the global
Server
object, and only requires aSQLServer
instead which makes it easier to play nicely with tenants. However, we still have the problem of incompatible status and admin servers which are in use on other endpoints. Future work will unify the tenant scoped versions of these servers and allow them to be used here, enabling full API V2 compatibility on tenants.Informs: #80789
Release note (ops change): sql tenants now support the HTTP endpoint under
/api/v2/sql
which allows the caller to execute an HTTP request containing SQL statements to execute. The JSON response contains the results. This endpoints works identically as on a non-tenant server, except that it naturally scopes to the target tenant for SQL execution.Epic: CRDB-17356