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

Conditionally render model registry modals #3304

Conversation

jeff-phillips-18
Copy link
Contributor

Towards RHOAIENG-12117

Description

Update usage of modals in the model registry section to render them only when they would be shown rather than having them be rendered but hidden.

How Has This Been Tested?

Run thru the UI and check that then modals are shown only when they should be shown.

  • From the Model Registry page
    • from a model, use the kebab and select Archive model
    • verify the Archive model? modal is shown
  • From the Model Registry page
    • Click on a model
    • from the model details page, open a kebab menu for a version and select Deploy
    • verify the Deploy model modal is shown
  • From the Model Registry page
    • Click on a model
    • from the model details page, open a kebab menu for a version and select Archive model version
    • verify the Archive version? modal is shown
  • From the Model Registry page
    • Click on a model
    • from the model details page, click on a model version
    • from the model version page, select the Action menu then Deploy
    • verify the Deploy model modal is shown
  • From the Model Registry page
    • Click on a model
    • from the model details page, click on a model version
    • from the model version page, select the Action menu then Archive model
    • verify the Archive version? modal is shown
    • feel free to note the inconsistencies
  • From the Model Registry page
    • Click the kebab next to the Register model button, select View archived models
    • from the archived models page, click a kebab on one of the archived models and select Restore version
    • verify the Restore version modal is shown
  • From the Model Registry page
    • Click the kebab next to the Register model button, select View archived models
    • from the archived models page, click a version
    • on one of the archived model detail page and select Restore model
    • verify the Restore model modal is shown
  • From the Model Serving page (titled Deployed models)
    • Click the Deploy model button
    • verify the Deploy model modal is shown
  • From the Model Serving page (titled Deployed models)
    • Open a kebab on a deployed model and select Edit
    • verify the Edit model modal is shown

Test Impact

Current tests already test these modals.

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)

@christianvogt
Copy link
Contributor

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Oct 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt

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-ci openshift-ci bot added the approved label Oct 4, 2024
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 91.02564% with 7 lines in your changes missing coverage. Please review.

Project coverage is 84.84%. Comparing base (7ff95e0) to head (13904d7).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...ersionDetails/ModelVersionDetailsHeaderActions.tsx 66.66% 5 Missing ⚠️
...ry/screens/ModelVersions/ModelVersionsTableRow.tsx 89.47% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3304      +/-   ##
==========================================
- Coverage   84.87%   84.84%   -0.03%     
==========================================
  Files        1307     1308       +1     
  Lines       29188    29240      +52     
  Branches     7872     7913      +41     
==========================================
+ Hits        24774    24810      +36     
- Misses       4414     4430      +16     
Files with missing lines Coverage Δ
...reens/ModelVersions/ModelVersionsHeaderActions.tsx 100.00% <100.00%> (ø)
...odelVersionsArchive/ModelVersionArchiveDetails.tsx 95.23% <100.00%> (+0.11%) ⬆️
...Registry/screens/RegisterModel/ConnectionModal.tsx 73.33% <100.00%> (ø)
...s/RegisterModel/RegistrationCommonFormSections.tsx 95.34% <100.00%> (+0.22%) ⬆️
...reens/RegisteredModels/RegisteredModelTableRow.tsx 95.00% <100.00%> (+0.55%) ⬆️
...redModelsArchive/RegisteredModelArchiveDetails.tsx 96.77% <100.00%> (+0.10%) ⬆️
...ry/screens/components/ArchiveModelVersionModal.tsx 88.88% <ø> (-0.40%) ⬇️
...screens/components/ArchiveRegisteredModelModal.tsx 88.88% <ø> (-0.40%) ⬇️
.../screens/components/DeployRegisteredModelModal.tsx 87.80% <100.00%> (+1.44%) ⬆️
...s/modelRegistry/screens/components/ModelLabels.tsx 96.87% <100.00%> (+0.20%) ⬆️
... and 4 more

... and 44 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 7ff95e0...13904d7. Read the comment docs.

@openshift-merge-bot openshift-merge-bot bot merged commit 215d63d into opendatahub-io:main Oct 4, 2024
8 checks passed
lokeshrangineni pushed a commit to TomerFi/odh-dashboard that referenced this pull request Oct 4, 2024
@jeff-phillips-18 jeff-phillips-18 deleted the model-registry-modals branch October 4, 2024 18:28
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