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 serving modals #3307

Conversation

jeff-phillips-18
Copy link
Contributor

Towards RHOAIENG-12117

Description

Update usage of modals in the model serving 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 Serving page
    • For a project with KServe enabled, select the Deploy model button
    • verify the Deploy model modal is shown
  • From the Model Serving page
    • For a project with ModelMesh enabled, select the Deploy model button
    • verify the Deploy model modal is shown
  • From the Model Serving page
    • For a project with ModelMesh enabled, select the kebab for an existing model and select Delete
    • verify the Delete deployed model? modal is shown
  • From the Model Serving page
    • For a project with ModelMesh enabled, select the kebab for an existing model and select Edit
    • verify the Edit model modal is shown
  • On a cluster with no model registries (shared Model Serving cluster), from the Model registry settings page
    • Click the Create model registry button
    • verify the Create model registry modal is shown
  • On a cluster with model registries (shared Model Registry cluster), from the Model registry settings page
    • For an existing model registry, select the kebab menu then View database configuration
    • verify the View database configuration modal is shown
  • On a cluster with model registries (shared Model Registry cluster), from the Model registry settings page
    • For an existing model registry, select the kebab menu then Delete model registry
    • verify the Delete model registry? modal is shown
  • On a cluster with model registries (shared Model Registry cluster), from the Model registry settings page
    • Click the Create model registry button
    • verify the Create model registry modal is shown
  • For a project with model serving type not selected, navigate to the project details page and chose the Models tab
    • Select Deploy model from the Single-model serving platform card
    • verify the Deploy model modal is shown
  • For a project with model serving type not selected, navigate to the project details page and chose the Models tab
    • Select Add model server from the Multi-model serving platform card
    • verify the Add model server 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)

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 70.58824% with 30 lines in your changes missing coverage. Please review.

Project coverage is 84.80%. Comparing base (85ce695) to head (a26f3c3).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...elServing/screens/global/InferenceServiceTable.tsx 38.88% 11 Missing ⚠️
.../projects/ModelMeshSection/ServingRuntimeTable.tsx 25.00% 6 Missing ⚠️
...s/BiasConfigurationPage/BiasConfigurationTable.tsx 16.66% 5 Missing ⚠️
...as/BiasConfigurationPage/BiasConfigurationPage.tsx 33.33% 4 Missing ⚠️
...s/modelServing/screens/global/ServeModelButton.tsx 83.33% 2 Missing ⚠️
...lServing/screens/projects/ModelServingPlatform.tsx 91.66% 1 Missing ⚠️
...projects/NIMServiceModal/DeployNIMServiceModal.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3307      +/-   ##
==========================================
+ Coverage   84.77%   84.80%   +0.02%     
==========================================
  Files        1308     1308              
  Lines       29247    29257      +10     
  Branches     7936     7954      +18     
==========================================
+ Hits        24795    24810      +15     
+ Misses       4452     4447       -5     
Files with missing lines Coverage Δ
.../screens/components/DeployRegisteredModelModal.tsx 88.37% <100.00%> (+0.56%) ⬆️
...nd/src/pages/modelRegistrySettings/CreateModal.tsx 68.67% <100.00%> (ø)
...modelRegistrySettings/DeleteModelRegistryModal.tsx 55.17% <ø> (-1.50%) ⬇️
.../modelRegistrySettings/ModelRegistriesTableRow.tsx 94.73% <100.00%> (+1.40%) ⬆️
...es/modelRegistrySettings/ModelRegistrySettings.tsx 100.00% <100.00%> (ø)
.../modelRegistrySettings/ViewDatabaseConfigModal.tsx 100.00% <ø> (ø)
...onfigurationModal/ManageBiasConfigurationModal.tsx 87.80% <ø> (-0.30%) ⬇️
...ng/screens/projects/EmptyMultiModelServingCard.tsx 100.00% <100.00%> (ø)
...ving/screens/projects/EmptyNIMModelServingCard.tsx 11.11% <ø> (ø)
...g/screens/projects/EmptySingleModelServingCard.tsx 100.00% <100.00%> (ø)
... and 12 more

... 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 85ce695...a26f3c3. Read the comment docs.

Copy link
Contributor

@jenny-s51 jenny-s51 left a comment

Choose a reason for hiding this comment

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

/lgtm @jeff-phillips-18 . Tested all modals using shared Model Serving cluster and shared Model Registry cluster. Code updates look good, modals working as expected.

Copy link
Contributor

openshift-ci bot commented Oct 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: jenny-s51

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 c8d7822 into opendatahub-io:main Oct 9, 2024
8 checks passed
@jeff-phillips-18 jeff-phillips-18 deleted the model-serving-modals branch October 9, 2024 20:34
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