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-13320] Storage class duplication isDefault edge cases #3261

Conversation

jpuzz0
Copy link
Contributor

@jpuzz0 jpuzz0 commented Sep 26, 2024

https://issues.redhat.com/browse/RHOAIENG-13320
https://issues.redhat.com/browse/RHOAIENG-13401

Description

Added new logic to account for edge cases where users manually update storage classes from the OpenShift dashboard. The situations accounted for include:

Storage class table:

  1. If isEnabled is false & isDefault is true (set from OpenShift dashboard), then set isEnabled to true.
  2. When all configs exist but no ODH default is defined, update to set the OpenShift default or the first found storage class as the ODH default and show the same alert as when configs are initialized.
  3. Disable corresponding IsDefault while Enabling is ongoing.

Storage class dropdown:

  1. Disable storage class dropdown when only 1 value exists.
  2. Hide the dropdown when no storage class configs are defined.

How Has This Been Tested?

By forcing the scenarios listed in the description above between OpenShift dashboard and the ODH dashboard.

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

Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 94.20290% with 8 lines in your changes missing coverage. Please review.

Project coverage is 84.97%. Comparing base (6ca046e) to head (cd32753).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...src/pages/storageClasses/StorageClassesContext.tsx 90.62% 6 Missing ⚠️
...rojects/screens/detail/storage/StorageTableRow.tsx 75.00% 1 Missing ⚠️
...nd/src/pages/storageClasses/StorageClassesPage.tsx 93.33% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3261      +/-   ##
==========================================
+ Coverage   84.90%   84.97%   +0.06%     
==========================================
  Files        1299     1301       +2     
  Lines       29001    29049      +48     
  Branches     7807     7824      +17     
==========================================
+ Hits        24623    24683      +60     
+ Misses       4378     4366      -12     
Files with missing lines Coverage Δ
.../src/components/table/TableRowTitleDescription.tsx 100.00% <100.00%> (ø)
...s/projects/screens/detail/storage/StorageTable.tsx 100.00% <ø> (ø)
...cts/screens/spawner/storage/StorageClassSelect.tsx 93.02% <100.00%> (+3.02%) ⬆️
...es/storageClasses/ResetCorruptConfigValueAlert.tsx 94.11% <100.00%> (ø)
...c/pages/storageClasses/StorageClassConfigValue.tsx 100.00% <100.00%> (ø)
.../pages/storageClasses/StorageClassDefaultRadio.tsx 100.00% <100.00%> (ø)
.../pages/storageClasses/StorageClassEnableSwitch.tsx 100.00% <100.00%> (ø)
...d/src/pages/storageClasses/StorageClassesTable.tsx 100.00% <100.00%> (ø)
...rc/pages/storageClasses/StorageClassesTableRow.tsx 100.00% <100.00%> (ø)
frontend/src/pages/storageClasses/utils.ts 92.00% <100.00%> (+0.33%) ⬆️
... and 3 more

... and 5 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 6ca046e...cd32753. Read the comment docs.

@jpuzz0 jpuzz0 force-pushed the RHOAIENG-13320-storage-class-edge-cases branch 3 times, most recently from 9be30ff to ef5e5c8 Compare September 26, 2024 16:03
@jpuzz0 jpuzz0 force-pushed the RHOAIENG-13320-storage-class-edge-cases branch from ef5e5c8 to cd32753 Compare September 26, 2024 16:04
@Gkrumbach07
Copy link
Member

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Sep 26, 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 027278b into opendatahub-io:main Sep 26, 2024
8 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.

2 participants