-
Notifications
You must be signed in to change notification settings - Fork 667
Use User settings hook for topology layout data, topology view state (graph/list) and cloudshell terminal #7051
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
Conversation
|
/assign |
471b984 to
27b9fc1
Compare
frontend/packages/console-app/src/components/cloud-shell/CloudShellTerminal.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/dev-console/src/components/topology/components/const.ts
Outdated
Show resolved
Hide resolved
239cb2c to
20d04df
Compare
|
/retest |
20d04df to
e9cb66c
Compare
frontend/packages/dev-console/src/components/topology/Topology.tsx
Outdated
Show resolved
Hide resolved
ddbb9c6 to
15c1cc6
Compare
|
/hold We cannot merge this until the backend support is ready. I suggest splitting this PR into one just for the utility function and tests and another for the subsequent updates to the existing code to move from localStorage to user settings. |
frontend/packages/console-app/src/components/cloud-shell/const.ts
Outdated
Show resolved
Hide resolved
frontend/packages/console-app/src/components/cloud-shell/CloudShellTerminal.tsx
Outdated
Show resolved
Hide resolved
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.
I would have to look into this further but looks like this is a change in behavior because setCloudShellNamespace only updated what was stored in localStorage. Now setNamespace also updates the state.
Unless absolutely sure, I suggest keeping the state namespace separate from the user settings.
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.
i tried verifying it and we had setCloudShellNamespace to set in localStorage and getCloudShellNamespace to get from LocalStorage so with setNamespace it'll update the ns in ConfigMap, don't we need that.
@sahil143 can you as well verify once, if you get time?
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.
I tested it locally cloud shell seems to work as expected.
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.
Verified as well that setting this, while it does trigger an effect, will not cause any issues.
15c1cc6 to
b9097cb
Compare
b9097cb to
b32e399
Compare
ae97a1c to
2eb4cd1
Compare
sahil143
left a comment
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
|
Tested it again together with api change, works fine. @invincibleJai needs rebase after #7199 |
2eb4cd1 to
227b733
Compare
|
Still works fine 😄 /lgtm |
|
/title Use User settings hook for topology layout data, topology view state (graph/list) and cloudshell terminal |
|
Looks like request url: request payload: 422 error response: |
@christianvogt @invincibleJai The reason is that the ConfigMap contains no data. I fixed this in my PR #7327 by using a different patch format (merge-patch+json instead of patch+json). See: We can merge that as part of my PR or Jai can also integrate this into this PR. As workaround you need to add some fake |
Thanks @jerolimov @christianvogt the problem is as you described if data is not there in Configmap and tries operation I updated the code to perform Let me know if you see issue. |
227b733 to
cf554d0
Compare
|
/hold cancel |
|
/assign @christianvogt |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, invincibleJai, jeff-phillips-18, jerolimov, sahil143 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@invincibleJai: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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 |
Fixes:
https://issues.redhat.com/browse/ODC-5082
Analysis / Root cause:
User preferences were saved in localStorage so not persisted across browsers
Implemented this hook for
Depends on : https://github.com/openshift/console/pull/7301/files
Solution Description:
Implemented useUserSettings for three features
Browser conformance: