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

feat: fetching resources names from the Account CR #3535

Merged

Conversation

olavtar
Copy link
Contributor

@olavtar olavtar commented Dec 2, 2024

https://issues.redhat.com/browse/NVPE-29

Description

Fetching resources names from the Account CR instead of using the static ones.

How Has This Been Tested?

It has been tested locally.

Test Impact

Checked to make sure that all 4 resources names are being pulled from the Account CR.
Unit test was added for the new function.

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 dpanshug and lucferbux December 2, 2024 21:49
@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 2, 2024
Copy link
Contributor

openshift-ci bot commented Dec 2, 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.

@olavtar olavtar force-pushed the resources-from-AccountCR branch 2 times, most recently from 9725193 to c9d6db1 Compare December 3, 2024 20:53
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 91.37931% with 5 lines in your changes missing coverage. Please review.

Project coverage is 85.14%. Comparing base (548ad3d) to head (5d97070).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...rc/pages/modelServing/screens/projects/nimUtils.ts 87.09% 4 Missing ⚠️
...projects/NIMServiceModal/ManageNIMServingModal.tsx 88.88% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3535      +/-   ##
==========================================
- Coverage   85.18%   85.14%   -0.04%     
==========================================
  Files        1380     1382       +2     
  Lines       31542    31572      +30     
  Branches     8818     8824       +6     
==========================================
+ Hits        26869    26883      +14     
- Misses       4673     4689      +16     
Files with missing lines Coverage Δ
frontend/src/api/k8s/nimAccounts.ts 100.00% <100.00%> (ø)
frontend/src/api/models/odh.ts 100.00% <100.00%> (ø)
frontend/src/k8sTypes.ts 100.00% <ø> (ø)
...odelServing/screens/projects/useNIMTemplateName.ts 100.00% <100.00%> (ø)
...d/src/pages/modelServing/screens/projects/utils.ts 93.65% <100.00%> (+0.02%) ⬆️
...projects/NIMServiceModal/ManageNIMServingModal.tsx 87.87% <88.88%> (+0.66%) ⬆️
...rc/pages/modelServing/screens/projects/nimUtils.ts 83.63% <87.09%> (-1.31%) ⬇️

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

Copy link
Contributor

@emilys314 emilys314 left a comment

Choose a reason for hiding this comment

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

@andrewballantyne
Copy link
Member

/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 4, 2024
@emilys314
Copy link
Contributor

/lgtm

Copy link
Member

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

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

I think you're missing something -- when you request for the secrets and configmaps from the api -- you're not going to work out if they are named differently in the Account CR.

const secretNames = ['nvidia-nim-access', 'nvidia-nim-image-pull'];
const configMapName = 'nvidia-nim-images-data';

This still exists.

I think we need to rewrite this endpoint to support a "type" (maybe the key in the .status object) and pull the data from the CR itself. Not request it by name... as the name is dynamic now.

@openshift-ci openshift-ci bot removed the lgtm label Dec 6, 2024
Copy link
Member

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

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

Comments about passing dashboardNamespace around.

@olavtar olavtar force-pushed the resources-from-AccountCR branch from 6f87937 to 06b1d17 Compare December 10, 2024 20:22
@olavtar olavtar requested a review from emilys314 December 10, 2024 21:40
@emilys314
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Dec 11, 2024
Copy link
Member

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

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

Seems you have some left over code from an earlier iteration?

@openshift-ci openshift-ci bot removed the lgtm label Dec 13, 2024
@openshift-ci openshift-ci bot added the lgtm label Dec 14, 2024
Copy link
Contributor

openshift-ci bot commented Dec 14, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne

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

@andrewballantyne
Copy link
Member

/retest

1 similar comment
@emilys314
Copy link
Contributor

/retest

@olavtar olavtar force-pushed the resources-from-AccountCR branch from 03f2bb3 to 94d0ba0 Compare December 16, 2024 18:02
@openshift-ci openshift-ci bot removed the lgtm label Dec 16, 2024
@andrewballantyne
Copy link
Member

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm 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.

3 participants