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

[RHOAIENG-1101] Cannot remove additional storage from the workbench configuration #3320

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

jpuzz0
Copy link
Contributor

@jpuzz0 jpuzz0 commented Oct 10, 2024

https://issues.redhat.com/browse/RHOAIENG-1101

Description

Workbench create/edit now has a table view to allow for multiple PVC instances to be created, where currently only 1 row is creatable/editable. The buttons above the table are not actionable yet and are placeholders for now. Some logic has been updated as a part of the submission process to attach multiple volumes (from PVC creations) for the notebook when available.

Default table data on creation
image

Detach modal
image

Empty state when all are detached
image

Edit modal on creation

NOTE: this edit modal is a starting point and meant to be expanded upon with a separate jira; https://issues.redhat.com/browse/RHOAIENG-7681

image

(cc @xianli123)

How Has This Been Tested?

When creating a workbench, verify the set of fields that were previously visible are now replaced with the editable table view. The Edit modal itself is a part of a different story, but one was made here as a starting point, where mainly the mount path and some show/hide of alerts will change (along with some implementation).

Test Impact

Updated mocked cypress tests to simply verify table data for now as a part of creating/editing a workbench. Since this feature has other parts, e2e mock testing will be dependent on their completion.

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

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress This PR is in WIP state label Oct 10, 2024
@jpuzz0 jpuzz0 force-pushed the RHOAIENG-1101 branch 4 times, most recently from 8e91e1d to 86f0874 Compare October 11, 2024 17:40
@jpuzz0 jpuzz0 changed the title WIP [RHOAIENG-1101] Cannot remove additional storage from the workbench configuration [RHOAIENG-1101] Cannot remove additional storage from the workbench configuration Oct 11, 2024
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress This PR is in WIP state label Oct 11, 2024
@jpuzz0 jpuzz0 force-pushed the RHOAIENG-1101 branch 4 times, most recently from deb1bc6 to 37e41c9 Compare October 11, 2024 19:06
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 59.68750% with 129 lines in your changes missing coverage. Please review.

Project coverage is 85.59%. Comparing base (01165de) to head (e4b84fa).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ts/screens/spawner/storage/ClusterStorageTable.tsx 58.73% 26 Missing ⚠️
.../screens/spawner/storage/SpawnerMountPathField.tsx 3.84% 25 Missing ⚠️
.../screens/spawner/storage/WorkbenchStorageModal.tsx 4.16% 23 Missing ⚠️
...src/pages/projects/screens/spawner/SpawnerPage.tsx 72.91% 13 Missing ⚠️
...creens/spawner/storage/AddExistingStorageField.tsx 0.00% 10 Missing ⚠️
...ens/spawner/storage/AttachExistingStorageModal.tsx 12.50% 7 Missing ⚠️
...rc/pages/projects/screens/spawner/storage/utils.ts 73.07% 7 Missing ⚠️
...eens/spawner/storage/ClusterStorageDetachModal.tsx 16.66% 5 Missing ⚠️
...c/pages/projects/screens/spawner/SpawnerFooter.tsx 84.61% 4 Missing ⚠️
...src/pages/projects/screens/spawner/spawnerUtils.ts 71.42% 4 Missing ⚠️
... and 4 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3320      +/-   ##
==========================================
- Coverage   85.60%   85.59%   -0.02%     
==========================================
  Files        1347     1349       +2     
  Lines       30704    30750      +46     
  Branches     8554     8569      +15     
==========================================
+ Hits        26285    26321      +36     
- Misses       4419     4429      +10     
Files with missing lines Coverage Δ
frontend/src/api/k8s/pvcs.ts 96.00% <100.00%> (ø)
frontend/src/concepts/k8s/NameDescriptionField.tsx 92.50% <100.00%> (+0.39%) ⬆️
...d/src/pages/modelServing/screens/projects/utils.ts 94.33% <ø> (ø)
...pages/projects/components/NotebookRestartAlert.tsx 80.00% <100.00%> (-20.00%) ⬇️
...tend/src/pages/projects/pvc/useNotebookPVCItems.ts 100.00% <100.00%> (ø)
...ojects/screens/detail/storage/BaseStorageModal.tsx 82.60% <100.00%> (+1.21%) ⬆️
...s/projects/screens/detail/storage/StorageTable.tsx 100.00% <ø> (ø)
...src/pages/projects/screens/detail/storage/utils.ts 78.57% <100.00%> (+16.07%) ⬆️
...creens/spawner/storage/CreateNewStorageSection.tsx 100.00% <100.00%> (ø)
...cts/screens/spawner/storage/StorageClassSelect.tsx 90.90% <100.00%> (-2.28%) ⬇️
... and 16 more

... and 4 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 01165de...e4b84fa. Read the comment docs.

@xianli123
Copy link

Thanks @jpuzz0 ! Overall LGTM!
As a tip (it may be outside the scope of https://issues.redhat.com/browse/RHOAIENG-1101), when creating a workbench or storage, the storage size should display "Max XXGi" instead of "XXGi."

@jpuzz0 jpuzz0 force-pushed the RHOAIENG-1101 branch 2 times, most recently from 7ca7481 to 9d1c493 Compare October 14, 2024 14:16
@jpuzz0
Copy link
Contributor Author

jpuzz0 commented Oct 14, 2024

Thanks @jpuzz0 ! Overall LGTM! As a tip (it may be outside the scope of https://issues.redhat.com/browse/RHOAIENG-1101), when creating a workbench or storage, the storage size should display "Max XXGi" instead of "XXGi."

@xianli123 I've made this change. Thanks for calling it out!

@xianli123
Copy link

Thanks @jpuzz0 . Once it's changed, it will look good!

@jpuzz0 jpuzz0 force-pushed the RHOAIENG-1101 branch 4 times, most recently from c0e7f42 to ea21b77 Compare October 17, 2024 15:37
@jpuzz0 jpuzz0 force-pushed the RHOAIENG-1101 branch 2 times, most recently from f9cbcc5 to db16057 Compare October 17, 2024 15:45
@Gkrumbach07
Copy link
Member

Ok so this needs @dpanshug PR to make it able to merge. BC as of right now there is no way to attach an existing PVC and create a new one after one is detached

@jpuzz0
Copy link
Contributor Author

jpuzz0 commented Oct 23, 2024

Ok so this needs @dpanshug PR to make it able to merge. BC as of right now there is no way to attach an existing PVC and create a new one after one is detached

@Gkrumbach07
We could temporarily comment out the detach-ability. I'm ok with leaving this open though if that's what you'd prefer.

@Gkrumbach07
Copy link
Member

  • it seems like the edit modal does not save the changes
  • edit modal opens to custom path every time and parses paths incorrectly sometimes
  • validation seems incorrect. it allows you to submit plain spaces. this is only for attach storage
  • you can submit empty for standard path but only after you switch between custom and standard once
  • cannot detach attached storage or existing storage
  • names are allowed to be the same
  • this can happen if you attach an existing storage with the same name
  • or create a new one with the same name
  • storage that has already been created does not disable storage class dropdown

@@ -31,8 +31,11 @@ const CreateNewStorageSection = <D extends CreatingStorageObject>({
<NameDescriptionField
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be great to replace this with K8sNameDescriptionField to allow the user to manually set the K8s resource name if desired and would work towards RHOAIENG-14746

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a lot in-flight with this PR as it is right now, and since the replacement will involve some rework of this PR, I would prefer it be a separate issue if not just a part of the JIRA you've cited here.

@jpuzz0 jpuzz0 force-pushed the RHOAIENG-1101 branch 2 times, most recently from 5bf09e2 to 4a2279e Compare November 8, 2024 20:36
@Gkrumbach07
Copy link
Member

Untitled

on edit of a root mount path, it wont let me save because it thinks that the path is taken, but that path is used by the one i am editing

@jpuzz0 jpuzz0 force-pushed the RHOAIENG-1101 branch 3 times, most recently from 67ea9ef to eab9351 Compare November 8, 2024 21:37
@Gkrumbach07
Copy link
Member

some bugs i found this iteration

  • created storage, either first initial one or newly by pressing create storage, will result in a blank path
  • you can add the same pvc multiple times
  • duplicate storage path is not being validated with all paths in the table

Untitled

@jpuzz0 jpuzz0 force-pushed the RHOAIENG-1101 branch 2 times, most recently from c3ad890 to 9c3909c Compare November 13, 2024 16:02
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.

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Nov 13, 2024
Copy link
Contributor

openshift-ci bot commented Nov 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dpanshug, 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 a0e16f5 into opendatahub-io:main Nov 13, 2024
6 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.

6 participants