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

dbconsole ui: after setting ui timezone cluster setting to EDT non-admin users continue to see UTC #108117

Closed
thtruo opened this issue Aug 3, 2023 · 3 comments · Fixed by #108486
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@thtruo
Copy link
Contributor

thtruo commented Aug 3, 2023

Describe the problem

CockroachDB v23.1 introduces a way view timestamps in DB Console in your preferred timezone using the ui.display_timezone cluster setting.

Setting this cluster setting to a non-UTC timezone results in admin users seeing the preferred timezone. However, non-admin users will continue to see UTC timezone, which is an unexpected result. All users (including non-admin users) should see timestamps in the preferred timezone when using the DB Console for that cluster.

To Reproduce

  1. Create an admin user
  2. As the admin user, run SET CLUSTER SETTING ui.display_timezone = 'america/new_york';
  3. As an admin user, log into the DB Console to verify that timestamps in fact get displayed in EDT (not UTC)
  4. For sanity, log into the DB Console as another admin user to also verify timestamps get displayed in EDT (not UTC)
  5. Now, log into the DB Console as a non-admin user. You will see that timestamps get displayed as UTC - this is unexpected!

Example screenshots

  • Here is what a non-admin user sees (unexpected behavior)
Screenshot 2023-08-03 at 11 08 32 AM
  • Here is what an admin user sees (expected behavior)
Screenshot 2023-08-03 at 11 10 58 AM

Expected behavior
When a user configures the DB Console timezone display

SET CLUSTER SETTING ui.display_timezone = 'america/new_york';

All users accessing the DB Console should see timestamps displayed in that time zone (EDT).

Environment:

  • CockroachDB version v23.1.5 and v23.1.6

Jira issue: CRDB-30320

@thtruo thtruo added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-cluster-observability labels Aug 3, 2023
@thtruo
Copy link
Contributor Author

thtruo commented Aug 3, 2023

cc @kevin-v-ngo for triage - this was an issue @Leeeeeeeroy-Jenkins encountered with a customer

@thtruo
Copy link
Contributor Author

thtruo commented Aug 3, 2023

@THardy98 assigning to you as the Cluster Obs L2

@THardy98
Copy link

THardy98 commented Aug 3, 2023

@thtruo or @Leeeeeeeroy-Jenkins do you know if the non-admin user has VIEWCLUSTERSETTING permission?

My immediate suspicion is that the non-admin user doesn't have VIEWCLUSTERSETTING permission, so when they try to read it from the console, it's an undefined value and we default back to UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants