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

release-22.1: cluster-ui: add sql api request wrapper #90079

Merged
merged 3 commits into from
Oct 20, 2022

Conversation

xinhaoz
Copy link
Member

@xinhaoz xinhaoz commented Oct 17, 2022

This commit allows DB Console to use the SQL over HTTP API from
/api/v2/sql/. A new fetch wrapper providing the custom header
necessary for the API and using content type JSON has been added.

Backport:

Please see individual PRs for details.

/cc @cockroachdb/release

Release justification: non-production code changes

This commit allows DB Console to use the SQL over HTTP API from
`/api/v2/sql/`. A new fetch wrapper providing the custom header
necessary for the API and using content type JSON has been added.

The clusterLocksApi components added in this commit use the above
SQL api functions to query from the `crdb_internal.cluster_locks`
table.

Release note: None
@xinhaoz xinhaoz requested a review from a team October 17, 2022 18:11
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@xinhaoz xinhaoz changed the title cluster-ui: add sql api request wrapper and clusterLocks request cluster-ui: add sql api request wrapper Oct 17, 2022
Copy link

@THardy98 THardy98 left a comment

Choose a reason for hiding this comment

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

Could you add release-22.1: ... to the PR title, to clarify that this is backport?
Took me an embarrassingly long time to realize that 👀

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

@xinhaoz xinhaoz changed the title cluster-ui: add sql api request wrapper release-22.1: cluster-ui: add sql api request wrapper Oct 17, 2022
Copy link

@THardy98 THardy98 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 4 of 4 files at r1, 3 of 3 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @xinhaoz)

This commit adds a helper function, `sqlResultsAreEmpty` to
the sql api that determines whether there are execution
results in the request response.

Release note: None
@xinhaoz xinhaoz force-pushed the backport22.1-85080-88859 branch from 4747cf4 to f1094cb Compare October 20, 2022 05:19
@xinhaoz xinhaoz merged commit e7f33f2 into cockroachdb:release-22.1 Oct 20, 2022
@xinhaoz xinhaoz deleted the backport22.1-85080-88859 branch November 21, 2022 19:13
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