-
Notifications
You must be signed in to change notification settings - Fork 163
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
Storage class dropdown select #3212
Storage class dropdown select #3212
Conversation
0cffd35
to
a490b7d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3212 +/- ##
==========================================
+ Coverage 85.34% 85.43% +0.08%
==========================================
Files 1275 1277 +2
Lines 28010 28080 +70
Branches 7449 7487 +38
==========================================
+ Hits 23905 23990 +85
+ Misses 4105 4090 -15
... and 23 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Thanks @Gkrumbach07 @dpanshug . We might show 2 states in this case:
|
frontend/src/pages/projects/screens/spawner/storage/StorageClassSelect.tsx
Outdated
Show resolved
Hide resolved
<SplitItem> | ||
{config?.isDefault && ( | ||
<Label isCompact color="green"> | ||
Default class |
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.
@xianli123 I'm noticing this reads Default class
here for a Select that has a label giving context of Storage class
, and in the storage classes table, a row with the "default" openshift label only reads Default
. Should they not be the same?
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.
Hi @jpuzz0.They are different.
- In the class table, the
default
label next to the class means that this class is the default class in OpenShift. - The
Default class
here for a 'Select' in storage creation form means that this class is the default class in RHOAI.
Initially, RHOAI uses Openshift's default class as its default class. If the RHOAI admin chooses another enabled class as the RHOAI default class, the new RHOAI default class will be used when the new storage is created.
Is it clear?
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.
Yes, thanks for clarifying! Should this label have a tooltip letting the user know this is the RHOAI default and not the Openshift default?
frontend/src/pages/projects/screens/spawner/storage/CreateNewStorageSection.tsx
Outdated
Show resolved
Hide resolved
Looks like when I try clicking on a storage class name in the dropdown it is not set in the form: Screen.Recording.2024-09-16.at.10.27.19.AM.movAlso, it appears even though the field is marked as required, I'm able to submit the workbench create form without a value specified. |
@xianli123 I fixed it so now deprecated also shows the name |
…tVolumesForNotebook function fix tests fix disabled checks pr fixes to state added tests linter fix
6afb03b
to
e5497f4
Compare
popperProps={{ appendTo: menuAppendTo }} | ||
/> | ||
<FormHelperText> | ||
{selectedStorageClassConfig && !selectedStorageClassConfig.isEnabled ? ( |
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.
If a storage class config is not enabled, its considered deprecated? Are we sure this is the condition meant to use to indicate when a storage class is deprecated?
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.
not enabled is deprecated, thats what was in the mocks
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 don't consider this blocking since this is how the mocks describe it, but @xianli123 Is "Deprecated" the appropriate term to use here? Can't the user just turn around and enable the storage class from the storage classes table? I guess my question is why not just consider it "Disabled"?
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.
lets merge it now bc this pr blocks purva's, and we can circle back to it
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.
Hi @Gkrumbach07 @jpuzz0 Let me explain how to get the 'deprecated' class:
- RHOAI admin enabled a class e.g. 'Class1'.
- Users used the 'Class1' to create storage e.g. 'Storage1'.
- RHOAI admin disabled 'Class1'.
- Users will see 'Class1' is deprecated when checking 'Storage1'.
In a word, if the class is never enabled, it should not be a deprecated class, because users cannot select it. If the class has been enabled and used by some storage, after disabling the class, the class will be marked as 'Deprecated' in the storage that is using this newly disabled class.
Does it make sense?
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.
@xianli123 Thanks for explaining!
@Gkrumbach07 Are we checking to make sure the user created storage using the enabled class? Seems that is a prerequisite on top of the disabled state to mark the class as deprecated.
@jpuzz0 I found the issue. when no default is set, i default select the first class, but that class was disabled, so it updated it so now i pick from only enabled classes |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Gkrumbach07, jpuzz0 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 |
Closes: RHOAIENG-1109
Description
This is a continuation of @dpanshug PR
How Has This Been Tested?
Create a new cluster storage and you check list of storage classes in the field.
Create new workbench and select storage class in cluster storage.
Test Impact
added test for default being set
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main
@xianli123