release-22.2: tenant: add apiv2 support for sql-over-http #91994
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 playnicely 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 SQLstatements 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
Backport:
Please see individual PRs for details.
/cc @cockroachdb/release
Release Justification: Low-risk high-impact additive feature to support more SQL Obs features for tenants