Skip to content

fix: clarify invalid container root errors - #2116

Merged
henry118 merged 1 commit into
NVIDIA:mainfrom
efegokdemir:fix/improve-ldcache-root-errors
Oct 1, 2026
Merged

henry118 merged 1 commit into
NVIDIA:mainfrom
efegokdemir:fix/improve-ldcache-root-errors

Conversation

@efegokdemir

@efegokdemir efegokdemir commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The update-ldcache hook used one error branch for OCI root lookup failures and invalid root values, producing a misleading <nil> suffix for empty or / roots. The cases are now split, lookup failures preserve their cause, and invalid roots are reported explicitly.

Changes

  • Keep validation inline in run, per maintainer feedback.
  • Preserve the underlying GetContainerRoot() failure with %w.
  • Report empty or / roots as explicit invalid-root errors.
  • Remove the no-longer-needed added test file.
  • Squash contributor work into one cryptographically signed commit.

Validation

  • gofmt -w cmd/nvidia-cdi-hook/update-ldcache/update-ldcache.go
  • go test ./cmd/nvidia-cdi-hook/update-ldcache — passed
  • go vet ./cmd/nvidia-cdi-hook/update-ldcache — passed
  • go build ./cmd/nvidia-cdi-hook/update-ldcache — passed
  • git diff --check — passed

The PR has one contributor commit, GitHub reports it as Verified, and the Golang and CodeQL checks are green.

Issue

Fixes #2115

@copy-pr-bot

copy-pr-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Comment thread cmd/nvidia-cdi-hook/update-ldcache/update-ldcache.go Outdated
@henry118

henry118 commented Oct 1, 2026

Copy link
Copy Markdown
Member

@efegokdemir Also can you please cryptographically sign the commits? thanks

@efegokdemir
efegokdemir force-pushed the fix/improve-ldcache-root-errors branch from 0af6232 to 1088dbc Compare October 1, 2026 17:49
@efegokdemir

Copy link
Copy Markdown
Contributor Author

Inlined the container-root lookup error and invalid-root checks directly in run and removed the helper abstraction. I rewrote the two contributor commits with the configured GitHub-linked SSH signing key and force-pushed with --force-with-lease; GitHub reports both replacement commits as verified.

@efegokdemir
efegokdemir force-pushed the fix/improve-ldcache-root-errors branch 2 times, most recently from ded8b53 to 45652aa Compare October 1, 2026 18:00
Comment thread cmd/nvidia-cdi-hook/update-ldcache/update-ldcache_test.go Outdated
@efegokdemir

Copy link
Copy Markdown
Contributor Author

@henry118 The requested cleanup is on the existing branch: the helper was inlined, the extra test file was removed, and the contributor commits were rewritten with verified cryptographic signatures. DCO is passing and the focused update-ldcache tests were run. Please re-review when available.

Signed-off-by: Efe Gökdemir <gokdemirefe1903@gmail.com>
@efegokdemir
efegokdemir force-pushed the fix/improve-ldcache-root-errors branch from 45652aa to c06d8ee Compare October 1, 2026 19:57
@henry118

henry118 commented Oct 1, 2026

Copy link
Copy Markdown
Member

/ok to test c06d8ee

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 36918093826

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage decreased (-0.01%) to 44.26%

Details

  • Coverage decreased (-0.01%) from the base build.
  • Patch coverage: 5 uncovered changes across 1 file (0 of 5 lines covered, 0.0%).
  • 1 coverage regression across 1 file.

Uncovered Changes

File Changed Covered %
cmd/nvidia-cdi-hook/update-ldcache/update-ldcache.go 5 0 0.0%

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
cmd/nvidia-cdi-hook/update-ldcache/update-ldcache.go 1 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 13554
Covered Lines: 5999
Line Coverage: 44.26%
Coverage Strength: 0.44 hits per line

💛 - Coveralls

@henry118
henry118 merged commit 9d34bb2 into NVIDIA:main Oct 1, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve invalid container root errors in update-ldcache hook

3 participants