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-23.1: cluster-ui: db details page should show user-friendly table names #127763

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

xinhaoz
Copy link
Member

@xinhaoz xinhaoz commented Jul 26, 2024

Backport 1/1 commits from #127085.

/cc @cockroachdb/release

Release justification: low-risk ui fix


This is a follow-up to #126961 which attempted to address remove quotes around the schema and table names if they did not contain periods or spaces. However, that PR was transforming the escaped version of the string. Ideally we want the db pages to show user-friendly display names without any escape chars, like in SHOW TABLES.

The DB pages currently stores the table name as a qualified name by quoting and escaping the schema and table name parts from the server response in order to make it easier to make sql requests using the encoded name. In order to provide a user-friendly display name, this commit stores the raw schema and table names in addition to the encoded name. In order to differentiate schema and table names in the UI, we simply highlight the schema name when it is displayed as part of a qualifed name in the db details page. In the future we may want to split up the schema name into its own column.

This commit does not fix this display issue for the table details page. Currently that page does not use any table name from the server, instead using the URL part as the table display name, which the page expects to be in the qualified encoded <schema>.<table> form. Ideally in the future we should change this route so that either:

  • the path is changed to separate the schema and table parts in route params, e.g. /db/schemaName/tableName
  • the route param is changed to use the table id instead of table the name and the raw table name will be fetched.

Fixes: #126823

Release note (ui change): In the DB details page, the table name will no longer appear with quotes around the schema and table name.

image image

This is a follow-up to cockroachdb#126961 which attempted to address
remove quotes around the schema and table names if they did
not contain periods or spaces. However, that PR was
transforming the escaped version of the string.  Ideally we
want the db pages to show user-friendly display names without
any escape chars, like in `SHOW TABLES`.

The DB pages currently stores the table name as a qualified
name by quoting and escaping the schema and table name parts
from the server response in order to make it easier to make
sql requests using the encoded name. In order to provide a
user-friendly display name, this commit stores the raw schema
and table names in addition to the encoded name. In order to
differentiate schema and table names in the UI, we simply
highlight the schema name when it is displayed as part of
a qualifed name in the db details page. In the future we may
want to split up the schema name into its own column.

This commit does _not_ fix this display issue for the table
details page. Currently that page does not use any table
name from the server, instead using the URL part as the
table display name, which the page expects to be in the
qualified encoded <schema>.<table> form. Ideally in the future
we should change this route so that either:
* the path is changed to separate the schema and table parts in
route params, e.g. `/db/schemaName/tableName`
* the route param is changed to use the table id instead of table
the name and the raw table name will be fetched.

Fixes: cockroachdb#126823

Release note (ui change): In the DB details page, the table name
will no longer appear with quotes around the schema and table name.
Copy link

blathers-crl bot commented Jul 26, 2024

Thanks for opening a backport.

Please check the backport criteria before merging:

  • Backports should only be created for serious
    issues
    or test-only changes.
  • Backports should not break backwards-compatibility.
  • Backports should change as little code as possible.
  • Backports should not change on-disk formats or node communication protocols.
  • Backports should not add new functionality (except as defined
    here).
  • Backports must not add, edit, or otherwise modify cluster versions; or add version gates.
  • All backports must be reviewed by the owning areas TL. For more information as to how that review should be conducted, please consult the backport
    policy
    .
If your backport adds new functionality, please ensure that the following additional criteria are satisfied:
  • There is a high priority need for the functionality that cannot wait until the next release and is difficult to address in another way.
  • The new functionality is additive-only and only runs for clusters which have specifically “opted in” to it (e.g. by a cluster setting).
  • New code is protected by a conditional check that is trivial to verify and ensures that it only runs for opt-in clusters. State changes must be further protected such that nodes running old binaries will not be negatively impacted by the new state (with a mixed version test added).
  • The PM and TL on the team that owns the changed code have signed off that the change obeys the above rules.
  • Your backport must be accompanied by a post to the appropriate Slack
    channel (#db-backports-point-releases or #db-backports-XX-X-release) for awareness and discussion.

Also, please add a brief release justification to the body of your PR to justify this
backport.

@blathers-crl blathers-crl bot added the backport Label PR's that are backports to older release branches label Jul 26, 2024
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@xinhaoz xinhaoz marked this pull request as ready for review July 29, 2024 21:23
@xinhaoz xinhaoz requested a review from a team as a code owner July 29, 2024 21:23
@xinhaoz xinhaoz requested review from dhartunian and removed request for a team July 29, 2024 21:23
@xinhaoz
Copy link
Member Author

xinhaoz commented Jul 29, 2024

23.1:
image

@xinhaoz xinhaoz merged commit 1c71e14 into cockroachdb:release-23.1 Jul 30, 2024
6 checks passed
@xinhaoz xinhaoz deleted the backport23.1-127085 branch July 30, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Label PR's that are backports to older release branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants