OCPNODE-4043: Fix NVIDIA DRA driver helm repo configuration#31104
OCPNODE-4043: Fix NVIDIA DRA driver helm repo configuration#31104sairameshv wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
WalkthroughHelm-related NVIDIA DRA prerequisites updated: release/namespace renamed to ChangesNVIDIA DRA Driver Helm Installer + Docs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 11 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sairameshv The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@test/extended/node/dra/nvidia/prerequisites_installer.go`:
- Around line 118-122: Replace the current helm repo add invocation that
tolerates "already exists" with a forced update: update the exec.CommandContext
call that constructs cmd (currently using "helm", "repo", "add", "nvidia",
"https://helm.ngc.nvidia.com/nvidia") to include the "--force-update" flag, and
remove the special-case check on output containing "already exists" so any
non-nil err is treated as failure and returned (i.e., eliminate the
strings.Contains(...) branch and keep the existing error return when
cmd.CombinedOutput() fails).
- Around line 125-131: The closure passed to wait.PollUntilContextTimeout
declares output, but never uses it; modify the retry closure used in
wait.PollUntilContextTimeout to capture both the command output and error from
exec.CommandContext ("helm repo update"), log the output on failure (e.g.,
include output in framework.Logf when err != nil), and store the last seen
output and error in outer-scope variables so that when the poll ultimately times
out you can return or wrap the original command error/output instead of only the
context deadline error; update references around the closure and the timeout
error handling to use these stored lastOutput/lastErr values for better
diagnostics.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 9f8e0bc0-bdbb-4dd6-8fb9-e9622fb3ba10
📒 Files selected for processing (1)
test/extended/node/dra/nvidia/prerequisites_installer.go
cefb01e to
ee084b5
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
test/extended/node/dra/nvidia/prerequisites_installer.go (1)
127-129: ⚡ Quick winScope Helm update to the NVIDIA repo for clarity and efficiency.
At line 128,
helm repo updateupdates all configured repos. Prefer scoping to justnvidiafor clarity and to avoid unnecessary network calls to unrelated repositories.Suggested patch
- cmd := exec.CommandContext(ctx, "helm", "repo", "update") + cmd := exec.CommandContext(ctx, "helm", "repo", "update", "nvidia")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@test/extended/node/dra/nvidia/prerequisites_installer.go` around lines 127 - 129, The helm command currently runs exec.CommandContext(ctx, "helm", "repo", "update") inside the anonymous function passed to wait.PollUntilContextTimeout, which updates all repos; change the command to scope the update to only the NVIDIA repo (e.g., exec.CommandContext(ctx, "helm", "repo", "update", "nvidia")) so lastOutput/lastErr reflect only the nvidia repo update and avoid updating unrelated repos.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@test/extended/node/dra/nvidia/prerequisites_installer.go`:
- Around line 26-27: The README for the NVIDIA DRA test still shows the old
repo/namespace/release commands; update the README in the NVIDIA DRA test
directory to reflect the new workflow by replacing the old namespace and release
values with the current constants (use draDriverNamespace = "nvidia-dra-driver"
and draDriverRelease = "nvidia-dra-driver") and adjust any example repo commands
to match the new repo workflow so the manual setup commands are accurate and
consistent with the code.
---
Nitpick comments:
In `@test/extended/node/dra/nvidia/prerequisites_installer.go`:
- Around line 127-129: The helm command currently runs exec.CommandContext(ctx,
"helm", "repo", "update") inside the anonymous function passed to
wait.PollUntilContextTimeout, which updates all repos; change the command to
scope the update to only the NVIDIA repo (e.g., exec.CommandContext(ctx, "helm",
"repo", "update", "nvidia")) so lastOutput/lastErr reflect only the nvidia repo
update and avoid updating unrelated repos.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: abf3f06d-cf2d-4bb9-8df8-fefebbe3599d
📒 Files selected for processing (1)
test/extended/node/dra/nvidia/prerequisites_installer.go
|
Scheduling required tests: |
ee084b5 to
0e2b8bb
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@test/extended/node/dra/nvidia/prerequisites_installer.go`:
- Around line 127-129: The helm repo update call currently runs
exec.CommandContext(ctx, "helm", "repo", "update") inside the
wait.PollUntilContextTimeout callback which updates all repos and can fail due
to unrelated broken repos; change the exec.CommandContext invocation in that
callback to target only the nvidia repo by passing "nvidia" as an argument
(i.e., call exec.CommandContext(ctx, "helm", "repo", "update", "nvidia")),
keeping the same handling of lastOutput and lastErr and the surrounding
wait.PollUntilContextTimeout logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: b7718c6a-c096-43bb-aa2b-ab29ca6fc928
📒 Files selected for processing (2)
test/extended/node/dra/nvidia/README.mdtest/extended/node/dra/nvidia/prerequisites_installer.go
|
Scheduling required tests: |
|
@sairameshv: This pull request references OCPNODE-4043 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target either version "5.0." or "openshift-5.0.", but it targets "openshift-4.22" instead. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
- Fix Helm repo URL (helm.ngc.nvidia.com/nvidia) - Add retry logic for flaky NVIDIA Helm repository updates Signed-off-by: Sai Ramesh Vanka <svanka@redhat.com>
|
Scheduling required tests: |
|
@sairameshv: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
/verified by ci |
|
@sairameshv: This PR has been marked as verified by DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
helm.ngc.nvidia.com/nvidiaSummary by CodeRabbit
Chores
Documentation