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
Bug 1908687: Use localstorage fallback when running a local bridge #7586
Bug 1908687: Use localstorage fallback when running a local bridge #7586
Conversation
/assign @jhadvig @christianvogt |
fff4701
to
bf7e424
Compare
@jerolimov: This pull request references Bugzilla bug 1908687, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/bugzilla refresh |
@jerolimov: This pull request references Bugzilla bug 1908687, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
bf7e424
to
a22efa5
Compare
/retest |
2 similar comments
/retest |
/retest |
/cc @christianvogt |
/lgtm @jerolimov it would be good to allow the dev to maybe specify a fixed user name. While logging in as kubeadmin, the configmap name is consistent, when using consoledeveloper, the configmap name gets concatenated with the user UID which differs on each dev cluster. |
fyi @spadgett |
cmd/bridge/main.go
Outdated
@@ -122,7 +122,8 @@ func main() { | |||
|
|||
fLoadTestFactor := fs.Int("load-test-factor", 0, "DEV ONLY. The factor used to multiply k8s API list responses for load testing purposes.") | |||
|
|||
fDevCatalogCategories := fs.String("developer-catalog-categories", "", "Allow catalog categories customization. (JSON as string)") | |||
fDevCatalogCategories := fs.String("developer-catalog-categories", "", "DEV ONLY. Allow catalog categories customization. (JSON as string)") |
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.
Is this flag really dev-only? I thought this was used in production (set by the operator).
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.
You're right. I removed this again.
cmd/bridge/main.go
Outdated
@@ -122,7 +122,8 @@ func main() { | |||
|
|||
fLoadTestFactor := fs.Int("load-test-factor", 0, "DEV ONLY. The factor used to multiply k8s API list responses for load testing purposes.") | |||
|
|||
fDevCatalogCategories := fs.String("developer-catalog-categories", "", "Allow catalog categories customization. (JSON as string)") | |||
fDevCatalogCategories := fs.String("developer-catalog-categories", "", "DEV ONLY. Allow catalog categories customization. (JSON as string)") | |||
fUserSettings := fs.String("user-settings", "configmap", "DEV ONLY. Define if the user settings should be stored in a shared ConfigMap or in users browser (configmap | localstorage).") |
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.
We should add validation when reading the flag.
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.
nit: maybe user-settings-location
?
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.
Added a validation to pkg/serverconfig/validate.go
Renamed everything to userSettingsLocation
or user-settings-location
fca383c
to
e89b463
Compare
@jerolimov: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest @spadgett Thanks for the review. I applied all your requests. Can you please check again. @christianvogt @invincibleJai I also added this commit f206ace to do NOT append the user uid (or kubeadmin) if this It's not beautiful because I added the |
/lgtm Thanks @jerolimov , verified both in cluster and off cluster seems to work as expected. can update description as well to use |
@jerolimov: This pull request references Bugzilla bug 1908687, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
nice /approve /assign @spadgett |
and skip second use of redux useSelector in inner useUserSettingsLocalStorage
f206ace
to
6d71d3c
Compare
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, invincibleJai, jerolimov, spadgett The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@jerolimov: All pull requests linked via external trackers have merged: Bugzilla bug 1908687 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes:
https://issues.redhat.com/browse/CONSOLE-2510
https://bugzilla.redhat.com/show_bug.cgi?id=1908687
Analysis / Root cause:
With the new user settings feature its hard for console developers who shares and switch between many clusters.
The settings could confuse other developers on the same cluster / user. And they are often missed when switching to another cluster.
Solution Description:
--user-settings-location=configmap|localstorage
.localstorage
in theoc-enviconment.sh
script. So its automatically active for all console developers which runs a local bridge.SERVER_FLAGS.userSettingsLocation
localstorage
.It's possible to override this settings with cli option like
bin/bridge --user-settings-location=configmap
Screen shots / Gifs for design review:
Unit test coverage report:
Test setup:
Browser conformance: