-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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-24.1: ui: alter role events render correctly #126568
release-24.1: ui: alter role events render correctly #126568
Conversation
b93be59
to
3c45c01
Compare
Thanks for opening a backport. Please check the backport criteria before merging:
If your backport adds new functionality, please ensure that the following additional criteria are satisfied:
Also, please add a brief release justification to the body of your PR to justify this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @blathers-crl[bot], @kyle-a-wong, and @nkodali)
pkg/ui/workspaces/db-console/src/util/events.ts
line 184 at r1 (raw file):
return `Role Altered: User ${info.User} altered role ${info.RoleName} with options ${info.Options}`; } else { return `Role Altered: User ${info.User} altered role ${info.RoleName}`;
if options isn't present, then the event will be defined as:
cockroach/pkg/sql/alter_role.go
Lines 503 to 506 in c4065c0
&eventpb.AlterRole{ | |
RoleName: roleName.Normalized(), | |
SetInfo: []string{"DEFAULTSETTINGS"}, | |
}) |
it might be worth checking that the SetInfo
field is populated, but that would just be a sanity check since that field always will contain a constant string (DEFAULTSETTINGS
).
i do think it would be useful for this message to say something more specific, like User %{info.User} altered default session variables for role
${info.RoleName}`. this backport lgtm, but if you agree, that change can be made in a separate PR.
3c45c01
to
6c85f55
Compare
Previously, ALTER ROLE events without role options would render with an "undefined" option in the event log on the DB Console. This change amends the rendering logic to correctly render events without any options. Resolves #124871 Epic: None Release note (bug fix,ui change): ALTER ROLE events in the DB Console event log now render correctly when the event does not contain any role options.
6c85f55
to
4bb36a8
Compare
Backport 1/1 commits from #126354 on behalf of @dhartunian.
/cc @cockroachdb/release
Previously, ALTER ROLE events without role options would render with an "undefined" option in the event log on the DB Console. This change amends the rendering logic to correctly render events without any options.
Resolves #124871
Epic: None
Release note (bug fix,ui change): ALTER ROLE events in the DB Console event log now render correctly when the event does not contain any role options.
Release justification: