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-12310] Error cases for storage class admin table #3213

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

jpuzz0
Copy link
Contributor

@jpuzz0 jpuzz0 commented Sep 16, 2024

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

Description

Show error/warning alerts for scenarios where individual storage class config values or the entire config are malformed in some way. Introduce abilities to correct those mistakes possibly made via the Openshift UI within the ODH dashboard's storage class table.

image

Unreadable config demo:
https://github.com/user-attachments/assets/86b3cda6-f5c4-41cf-bcdc-92f8787f9b61

Invalid data, default, enable config values:
https://github.com/user-attachments/assets/35a9d29c-f889-4101-a2f2-690fe4a8afbb

Invalid Display name demo:
https://github.com/user-attachments/assets/af5d969f-450c-4303-a1e5-3057554d114d

Invalid Description demo:
https://github.com/user-attachments/assets/8f4b14a3-b97f-4035-b24c-0f8d28a885b7

Invalid Display name and description demo:
https://github.com/user-attachments/assets/9fd6f80f-5590-42e9-b524-3c7db61c7b16

(cc @xianli123)

How Has This Been Tested?

  1. Edit storage classes within in Openshift via /search/ns/opendatahub?q=&kind=storage.k8s.io~v1~StorageClass by clicking on individual row actions, Edit annotations, then update the opendatahub.io/sc-config value to force invalid data.

With the feature flag enabled, visit the storage class table's page; /storageClasses?devFeatureFlags=disableStorageClasses

  1. Verify the cases outlined in the JIRA issue are covered and match the referenced designs.
  2. Verify all storage class edit modals are updated according to how/where they were opened from.
  3. Verify once updating a given row or individual cell that the data is reset and no longer considered "Corrupted".

Test Impact

Added cypress test covering multiple error cases

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 16, 2024

Codecov Report

Attention: Patch coverage is 95.83333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 85.48%. Comparing base (b5351a7) to head (d9bd9a3).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
frontend/src/pages/storageClasses/utils.ts 85.71% 2 Missing ⚠️
...rc/pages/storageClasses/CorruptedMetadataAlert.tsx 90.00% 1 Missing ⚠️
...es/storageClasses/ResetCorruptConfigValueAlert.tsx 93.75% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3213      +/-   ##
==========================================
+ Coverage   85.39%   85.48%   +0.08%     
==========================================
  Files        1277     1279       +2     
  Lines       28082    28159      +77     
  Branches     7487     7523      +36     
==========================================
+ Hits        23980    24071      +91     
+ Misses       4102     4088      -14     
Files with missing lines Coverage Δ
.../pages/storageClasses/StorageClassDefaultRadio.tsx 100.00% <ø> (+3.70%) ⬆️
...src/pages/storageClasses/StorageClassEditModal.tsx 94.44% <100.00%> (+2.44%) ⬆️
.../pages/storageClasses/StorageClassEnableSwitch.tsx 100.00% <ø> (+3.57%) ⬆️
...rc/pages/storageClasses/StorageClassesTableRow.tsx 100.00% <100.00%> (+2.08%) ⬆️
...rc/pages/storageClasses/CorruptedMetadataAlert.tsx 90.00% <90.00%> (ø)
...es/storageClasses/ResetCorruptConfigValueAlert.tsx 93.75% <93.75%> (ø)
frontend/src/pages/storageClasses/utils.ts 91.66% <85.71%> (+1.66%) ⬆️

... and 7 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 b5351a7...d9bd9a3. Read the comment docs.

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.

looks good, just one comment

@jpuzz0 jpuzz0 force-pushed the RHOAIENG-12310 branch 4 times, most recently from da97a1a to 24f4d53 Compare September 17, 2024 19:32
@xianli123
Copy link

Thanks! LGTM.

@Gkrumbach07
Copy link
Member

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Sep 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 4b1e286 into opendatahub-io:main Sep 18, 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.

3 participants