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

Disabling the 'Deploy model' button if NIM is disabled #3600

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

olavtar
Copy link
Contributor

@olavtar olavtar commented Dec 19, 2024

https://issues.redhat.com/browse/NVPE-66
https://issues.redhat.com/browse/NVPE-34

Description

If NIM is disabled, previously deployed projects are prevented from re-deploying a NIM model by disabling the 'Deploy model' button on various screens.
image
image
image
image
image

How Has This Been Tested?

Tested locally and verified various scenarios:

  • Removed the Account CR and ensured that if it’s a NIM-enabled project, the 'Deploy model' button is disabled.
  • Confirmed that for a KServe project, the 'Deploy model' button remains enabled.
  • Verified that if the Account CR status is true, the 'Deploy model' button is enabled."

Test Impact

Cypress tests were modified to accommodate.

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

@openshift-ci openshift-ci bot requested review from mturley and ppadti December 19, 2024 20:19
Copy link
Contributor

openshift-ci bot commented Dec 19, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign manosnoam for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link
Contributor

openshift-ci bot commented Dec 19, 2024

Hi @olavtar. Thanks for your PR.

I'm waiting for a opendatahub-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci openshift-ci bot added the needs-ok-to-test The openshift bot needs to label PRs from non members to avoid strain on the CI label Dec 19, 2024
Signed-off-by: Olga Lavtar <[email protected]>
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

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

Project coverage is 85.09%. Comparing base (14b1c4d) to head (49c3de4).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...src/concepts/nimServing/NIMAvailabilityContext.tsx 90.90% 1 Missing ⚠️
...s/modelServing/screens/global/ServeModelButton.tsx 75.00% 1 Missing ⚠️
...eens/projects/ModelServingPlatformButtonAction.tsx 90.90% 1 Missing ⚠️
...modelServing/screens/projects/useIsNIMAvailable.ts 91.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3600      +/-   ##
==========================================
- Coverage   85.16%   85.09%   -0.07%     
==========================================
  Files        1393     1396       +3     
  Lines       31939    32067     +128     
  Branches     8955     8985      +30     
==========================================
+ Hits        27200    27289      +89     
- Misses       4739     4778      +39     
Files with missing lines Coverage Δ
frontend/src/app/App.tsx 90.00% <ø> (ø)
...end/src/pages/modelServing/ModelServingContext.tsx 67.64% <ø> (ø)
...erving/screens/global/InferenceServiceTableRow.tsx 100.00% <100.00%> (ø)
...g/screens/projects/EmptySingleModelServingCard.tsx 100.00% <ø> (ø)
...lServing/screens/projects/ModelServingPlatform.tsx 99.11% <100.00%> (ø)
...c/pages/modelServing/useServingPlatformStatuses.ts 100.00% <100.00%> (ø)
...ns/detail/overview/serverModels/AddModelFooter.tsx 82.00% <ø> (ø)
...il/overview/serverModels/PlatformSelectSection.tsx 100.00% <100.00%> (ø)
...src/concepts/nimServing/NIMAvailabilityContext.tsx 90.90% <90.90%> (ø)
...s/modelServing/screens/global/ServeModelButton.tsx 93.33% <75.00%> (-1.91%) ⬇️
... and 2 more

... and 20 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 14b1c4d...49c3de4. Read the comment docs.

@emilys314
Copy link
Contributor

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test The openshift bot needs `ok-to-test` to allow non member PRs to run the tests. and removed needs-ok-to-test The openshift bot needs to label PRs from non members to avoid strain on the CI labels Dec 20, 2024
Comment on lines 8 to 11
const isNIMModelServingAvailable = useIsAreaAvailable(SupportedArea.NIM_MODEL).status;

useEffect(() => {
const checkNIMServingRuntime = async () => {
const isNIMRuntimeAvailable = await isNIMServingRuntimeTemplateAvailable(dashboardNamespace);
setIsNIMAvailable(isNIMModelServingAvailable && isNIMRuntimeAvailable);
};
const fetchNIMAvailability = React.useCallback(async () => {
const components = await fetchComponents(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you make the fetchNIMAvailability return early with false if isNIMModelServingAvailable is false? This way it will avoid the following API calls when we already know nim is not available

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

…delServingAvailable is false

Signed-off-by: Olga Lavtar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test The openshift bot needs `ok-to-test` to allow non member PRs to run the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants