-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui: use status server apis for stmt bundle ops
Since 23.1 we've been using the sql over http api to view, request and cancel stmt bundles for fingerprints. This caused a regression in the sql permissions required to use these features. Prior to using sql over http we only required `VIEWACTIVITY` or `VIEWACTIVITYREDACTED` for these operations. Now `VIEWSYSTEMTABLE` is also required since the sql over http api direclty reads from system.statement_diagnostics_requests as the db console user. Instead of creating a view and builtins on top of the system table, let's simply revert to the existing http apis on the status server that are already properly gated. This change reintroduces the following APIs to DB Console - `POST /_status/stmtdiagreports` to request statement bundles - `GET /_status/stmtdiagreports` to list statement bundles - `POST /_status/stmtdiagreports/cancel` to cancel statement bundles Limitations: This PR does not carry over the added behaviour in 23.1 where we prevent users from making multiple statement bundle reqs for a particular fingerprint. This is not really a common case in the UI since we show 'Waiting' in the overview page for the row when a stmt bundle is in progress for a fingerprint, which prevents another request for the same fingerprint. Epic: none Fixes: #121301 Release note (bug fix): Users with VIEWACTIVITY sql priv can now request, view and cancel stmt bundles in DB console.
- Loading branch information
Showing
1 changed file
with
61 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters