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

Cluster storage that was disconnected from the workbench doesn't update it's size info #3481

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

dpanshug
Copy link
Contributor

@dpanshug dpanshug commented Nov 15, 2024

RHOAIENG-527

Description

When the storage size is updated but no pod connected, the size doesn't get updated on UI. So added a condition which will display the updated size with warning.

Screenshot 2024-11-15 at 8 54 36 PM

If the storage is connected to workbenches

Screenshot 2024-11-26 at 3 49 27 PM

If the storage is not connected to any workbench

Screenshot 2024-11-26 at 3 49 18 PM

How Has This Been Tested?

  1. Create a cluster storage with workbench connected. (size: 12Gi)
  2. Disconnect the workbench from it.
  3. Edit the size. (size: 13Gi)
  4. You can see the updated size with warning popover.

Test Impact

Added cypress test to check the warning when cluster storage size is updated but no workbench is connected.

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main
    @xianli123 @kaedward

@dpanshug
Copy link
Contributor Author

@kaedward please check the wordings for this popover.

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.34%. Comparing base (fbeb889) to head (4e84c18).
Report is 69 commits behind head on main.

Files with missing lines Patch % Lines
...tend/src/pages/projects/components/PVSizeField.tsx 66.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3481      +/-   ##
==========================================
- Coverage   85.37%   85.34%   -0.03%     
==========================================
  Files        1352     1354       +2     
  Lines       30869    31119     +250     
  Branches     8616     8691      +75     
==========================================
+ Hits        26353    26558     +205     
- Misses       4516     4561      +45     
Files with missing lines Coverage Δ
...rc/concepts/dashboard/DashboardPopupIconButton.tsx 100.00% <100.00%> (ø)
frontend/src/k8sTypes.ts 100.00% <ø> (ø)
.../src/pages/projects/components/StorageSizeBars.tsx 95.23% <100.00%> (+0.79%) ⬆️
frontend/src/pages/projects/utils.ts 100.00% <100.00%> (ø)
...tend/src/pages/projects/components/PVSizeField.tsx 96.00% <66.66%> (-4.00%) ⬇️

... and 115 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fbeb889...4e84c18. Read the comment docs.

@xianli123
Copy link

Thanks @dpanshug! Once we get @kaedward 's suggestions and update the content, it will LGTM.

@Gkrumbach07
Copy link
Member

Wording from katie "To complete the storage size update, connect and run the workbench."

@xianli123
Copy link

@dpanshug @Gkrumbach07 As I mentioned in the RHOAIENG-527, it would be better to show the same alert when users change the storage size in the editing form. What do you think?

@Gkrumbach07
Copy link
Member

@xianli123

As I mentioned in the RHOAIENG-527, it would be better to show the same alert when users change the storage size in the editing form. What do you think?

We already show a warning there for the following: unbound pvcs and cannot reduce size of pvc

This one would conflict with both of these as it could be shown when both existing warnings are shown. We could just stack the warning alerts on top of each other

@xianli123
Copy link

We already show a warning there for the following: unbound pvcs and cannot reduce size of PVC

@Gkrumbach07 Do you mean the warning under the number input field? If so, this warning seems to appear only in storage that is connected to the workbench. Right? (correct me if I am wrong)

Screenshot 2024-11-21 at 21 27 55

@Gkrumbach07
Copy link
Member

@xianli123 you are right. this should be fine then

@xianli123
Copy link

xianli123 commented Nov 22, 2024

@Gkrumbach07 the change could be:

  • If the storage is connected to workbenches, we will show the warning Storage size can only be increased. If you do so, the workbench will restart and be unavailable for a period of time that is usually proportional to the size change. when they edit the storage size.

  • If the storage is not connected to any workbench, we should show the warning Storage size can only be increased. To complete the storage size update, you must connect to and run a workbench. when editing the storage size.

Does it make sense? cc @dpanshug @kywalker-rh

[Image 1]
image

[Image 2]
Screenshot 2024-11-22 at 17 44 09

@dpanshug
Copy link
Contributor Author

@xianli123 Currently if the storage is never connected to any workbench, the user can't edit the size. Do you mean we should enable it?
image

cc @Gkrumbach07

@xianli123
Copy link

@dpanshug It's weird. I can't reproduce the warning you shared, even though the storage didn't connect to any workbench. The screenshot below shows what I got.
Screenshot 2024-11-25 at 20 57 01

@dpanshug
Copy link
Contributor Author

dpanshug commented Nov 25, 2024

@xianli123 to reproduce it. You have to create a new cluster storage which never has connected to a workbench. You will see the field disabled.

But when the first connection is made, and you remove it, the field will always be enabled. It is a sort of weird behavior.

@Gkrumbach07
Copy link
Member

So this warning will show when a workbench has its size changed and is either not connected to a workbench or its connected workbenches are not running.

@dpanshug
Copy link
Contributor Author

@xianli123 @Gkrumbach07 PR updated, pls check the description for latest screenshots

@xianli123
Copy link

Thanks @dpanshug! LGTM!

@Gkrumbach07
Copy link
Member

@dpanshug can you rebase

Copy link
Member

@Gkrumbach07 Gkrumbach07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Dec 18, 2024
Copy link
Contributor

openshift-ci bot commented Dec 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Gkrumbach07

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 6a0bc4a into opendatahub-io:main Dec 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants