release-23.1: cluster-ui: break circular import of rootActions
#110256
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport 1/1 commits from #109720.
/cc @cockroachdb/release
Importing
rootActions
fromreducers.ts
in cluster-ui was causing a circular import, preventing one of the redux fields experiencing the cyclic dependency from having their reducer populated, which omitted that field from the store altogether. Currently, this field isuiConfig
which is affecting features that rely on checking the sql role of a user, such as displaying theReset SQL Stats
button.This commit extracts
rootActions
into its own file to remove the cyclic dependencies created.Fixes: #97996
Release note (bug fix): On CC,
Reset Sql Stats
button is now visible if the user has admin role.Release justification: bug fix for cloud
Using a production buiild 23.1 cluster-ui version: