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

Task/NVPE-32: Cleanup NIM integration tech preview resources #1369

Merged
merged 7 commits into from
Nov 14, 2024

Conversation

TomerFi
Copy link
Contributor

@TomerFi TomerFi commented Nov 13, 2024

Description

Version 2.16 will include the GA version of NVIDIA NIM integration. Cleaning up the TP version's resources introduced in 2.15 is required.

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

How Has This Been Tested?

go fmt
make lint
make test
go mod tidy

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
Copy link

openshift-ci bot commented Nov 13, 2024

Hi @TomerFi. 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.

pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
Comment on lines 292 to 294

// cleanup nvidia nim integration remove tech preview
multiErr = multierror.Append(multiErr, cleanupNimIntegrationTechPreview(ctx, cli, oldReleaseVersion))

Choose a reason for hiding this comment

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

@andrewballantyne dont we need to cleanup api key secret also? AFAIU UI will create the secret when user selects the enable button. So, if the secret is present then it will result in an error.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, that's a good catch. If we don't delete the secret and we don't have a NIM Account CR here... it will likely block the creation flow. @etirelli should we delete the customer's "key file" or look at some what to keep/update it on install in the new Controller way?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would say update/reuse would be best as it is unlikely the API key itself changed and forcing the customer to update might create confusion.

Copy link
Contributor

Choose a reason for hiding this comment

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

discussed in slack. We will delete the secret if it exists and let the user recreate it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Resolved in 0483894.

@mpaulgreen
Copy link

cc: @lburgazzoli @israel-hdez

TomerFi and others added 4 commits November 13, 2024 08:30
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
@TomerFi TomerFi marked this pull request as ready for review November 13, 2024 14:33
pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
pkg/upgrade/upgrade.go Outdated Show resolved Hide resolved
Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (incubation@e25487a). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff              @@
##             incubation    #1369   +/-   ##
=============================================
  Coverage              ?   18.96%           
=============================================
  Files                 ?       30           
  Lines                 ?     3390           
  Branches              ?        0           
=============================================
  Hits                  ?      643           
  Misses                ?     2678           
  Partials              ?       69           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zdtsw
Copy link
Member

zdtsw commented Nov 13, 2024

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test Ok to Test label Nov 13, 2024
Copy link
Contributor

@etirelli etirelli left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

openshift-ci bot commented Nov 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: etirelli

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

@TomerFi TomerFi changed the title chore: cleanup nim integration tech preview resources Task/NVPE-32: Cleanup NIM integration tech preview resources Nov 13, 2024
@zdtsw
Copy link
Member

zdtsw commented Nov 13, 2024

put on-hold,
i will need to test a bit more tomorrow morning + give other reviewers time to put comments if any.

@TomerFi
Copy link
Contributor Author

TomerFi commented Nov 13, 2024

/retest

@zdtsw
Copy link
Member

zdtsw commented Nov 14, 2024

test:

install 2.15.0 ODH do clean install, creation DSCI,

  • create dummy secret "nvidia-nim-access" in opendatahub NS
  • create dummy configmap "nvidia-nim-validation-result" in opendatahub NS
  • create dummy cronjob "nvidia-nim-periodic-validator" in opendatahub NS
    uninstall ODH, keep DSCI in cluster

build 2.16.1114 with PR, install
check log:

  • {"level":"info","ts":"2024-11-14T09:40:55Z","msg":"removed NIM validator CronJob successfully"}
  • {"level":"info","ts":"2024-11-14T09:40:55Z","msg":"removed NIM data ConfigMap successfully"}
  • {"level":"info","ts":"2024-11-14T09:40:55Z","msg":"removed NIM API key Secret successfully"}
    check above resourcs gone

@zdtsw
Copy link
Member

zdtsw commented Nov 14, 2024

in short, test result looks good

@openshift-ci openshift-ci bot removed the lgtm label Nov 14, 2024
Copy link

openshift-ci bot commented Nov 14, 2024

New changes are detected. LGTM label has been removed.

@zdtsw zdtsw merged commit 84d22f3 into opendatahub-io:incubation Nov 14, 2024
1 of 6 checks passed
zdtsw pushed a commit to zdtsw-forking/opendatahub-operator that referenced this pull request Nov 14, 2024
…ahub-io#1369)

* chore: cleanup nim integration tech preview resources

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>

* chore: apply suggestions from code review

Co-authored-by: Wen Zhou <wenzhou@redhat.com>

* chore: addressed pr reviews, better logging

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>

* chore: set nim cleanup for minors 14 and 15

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>

* chore: nim tp cleanup should remove api key secret

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>

* chore: addresed pr reviews, rewrite cleanup func

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>

---------

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
(cherry picked from commit 84d22f3)
@TomerFi TomerFi deleted the cleanup-nim-tp branch November 14, 2024 14:24
openshift-merge-bot bot pushed a commit that referenced this pull request Nov 14, 2024
* Task/NVPE-32: Cleanup NIM integration tech preview resources (#1369)

* chore: cleanup nim integration tech preview resources

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>

* chore: apply suggestions from code review

Co-authored-by: Wen Zhou <wenzhou@redhat.com>

* chore: addressed pr reviews, better logging

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>

* chore: set nim cleanup for minors 14 and 15

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>

* chore: nim tp cleanup should remove api key secret

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>

* chore: addresed pr reviews, rewrite cleanup func

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>

---------

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
Co-authored-by: Wen Zhou <wenzhou@redhat.com>
(cherry picked from commit 84d22f3)

* update: use old logger

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Tomer Figenblat <tomer.figenblat@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants