Skip to content

ui: disable invalid options for tenant advanced debug#97945

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
dhartunian:db-console-improvements
Mar 9, 2023
Merged

ui: disable invalid options for tenant advanced debug#97945
craig[bot] merged 1 commit intocockroachdb:masterfrom
dhartunian:db-console-improvements

Conversation

@dhartunian
Copy link
Copy Markdown
Collaborator

@dhartunian dhartunian commented Mar 2, 2023

Prevously, the Advanced Debug page on the DB console would show a lot of options to the tenant that were either unsupported, unimplemented, or not valid in that context. This change hides those options for now to create a smoother Console experience for tenants.

The changes made are currently implemented via a server-controlled feature flag that is enabled by default on tenants, and not on the system tenant.

The summary of disabled items is as follows:

Resolves: #80595
Epic: CRDB-12100

Release note: None

@dhartunian dhartunian requested review from a team, abarganier and knz March 2, 2023 22:11
@dhartunian dhartunian requested review from a team as code owners March 2, 2023 22:11
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

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

Nice, this is substantially less code than I thought it would be given the PR message.

Would it be possible to add some sort of banner or text to the page letting the user know that the reason they have limited functionality and may need to use the debug console from the admin tenant?

@dhartunian
Copy link
Copy Markdown
Collaborator Author

Nice, this is substantially less code than I thought it would be given the PR message.

Would it be possible to add some sort of banner or text to the page letting the user know that the reason they have limited functionality and may need to use the debug console from the admin tenant?

@stevendanna how's this?

Screenshot 2023-03-07 at 10 33 47 AM

@dhartunian dhartunian force-pushed the db-console-improvements branch from e18c71f to 52c8d25 Compare March 7, 2023 15:36
Copy link
Copy Markdown
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

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

LGTM modulo wording. Thanks!

Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @abarganier and @dhartunian)


pkg/server/serverpb/admin.proto line 1464 at r1 (raw file):

  // debug operations. This is helpful in application tenant contexsts, where these requests
  // can only return errors since the tenant cannot perform the operations.
  bool disable_kv_level_advanced_debug= 2;

nit: space before =


pkg/ui/workspaces/db-console/src/views/reports/containers/debug/index.tsx line 267 at r1 (raw file):

        <section className="section">
          <InlineAlert
            title="Some advanced debug options are not available on tenants."

"on secondary tenants"

@dhartunian dhartunian force-pushed the db-console-improvements branch 2 times, most recently from cbe61c9 to 46c69a7 Compare March 9, 2023 00:03
Prevously, the Advanced Debug page on the DB console would show a lot
of options to the tenant that were either unsupported, unimplemented,
or not valid in that context. This change hides those options for now
to create a smoother Console experience for tenants.

The changes made are currently implemented via a server-controlled
feature flag that is enabled by default on tenants, and not on the
system tenant.

Additionally, an alert banner is shown when viewing "Advanced Debug"
as the system tenant with a note mentioning that the system tenant
sees more options available.

The summary of disabled items is as follows:
* Problem ranges: hidden since implementation depends on liveness
  Issue to fix: cockroachdb#97941
* Data distribution: hidden due to error on tenants
  Issue to fix: cockroachdb#97942
* Stores section: not applicable to tenants
* Problem Ranges section: see above
* Raft and Key Visualizer links: not applicable to tenants
* Closed timestamps: not applicable to tenants
* Tracing active operations: ui impl proxies to nodes, needs changes
  Issue to fix: cockroachdb#97943
* Debug requests/events: not applicable to tenants
* Enqueue range: not applicable to tenants
* Node status: not implemented on tenants
* Single node's ranges: not implemented on tenants
* Hot Ranges (legacy): not implemented on tenants
* Single Node Specific: not implemented on tenants
* Cluster wide: not applicable to tenants
* Allocator: not applicable to tenants

Resolves: cockroachdb#80595
Epic: CRDB-12100

Release note: None
@dhartunian dhartunian force-pushed the db-console-improvements branch from 46c69a7 to 027f1a5 Compare March 9, 2023 17:19
Copy link
Copy Markdown
Collaborator Author

@dhartunian dhartunian left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @abarganier and @knz)


pkg/server/serverpb/admin.proto line 1464 at r1 (raw file):

Previously, knz (Raphael 'kena' Poss) wrote…

nit: space before =

done.


pkg/ui/workspaces/db-console/src/views/reports/containers/debug/index.tsx line 267 at r1 (raw file):

Previously, knz (Raphael 'kena' Poss) wrote…

"on secondary tenants"

done.

@dhartunian
Copy link
Copy Markdown
Collaborator Author

bors r=stevendanna,knz

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 9, 2023

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Mar 9, 2023

Build succeeded:

@craig craig bot merged commit ac7961d into cockroachdb:master Mar 9, 2023
@dhartunian dhartunian deleted the db-console-improvements branch February 5, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants