Skip to content

fix: preserve Docker feature flags when enabling CDI - #2049

Open
git-jxj wants to merge 1 commit into
NVIDIA:mainfrom
git-jxj:fix/preserve-docker-features-when-enabling-cdi
Open

fix: preserve Docker feature flags when enabling CDI#2049
git-jxj wants to merge 1 commit into
NVIDIA:mainfrom
git-jxj:fix/preserve-docker-features-when-enabling-cdi

Conversation

@git-jxj

@git-jxj git-jxj commented Sep 5, 2026

Copy link
Copy Markdown

Description

Running nvidia-ctk runtime configure --runtime=docker --enable-cdi against a daemon.json with existing feature flags replaces them with only cdi: true. For example, containerd-snapshotter: true and buildkit: false disappear.

Docker configuration is decoded into map[string]any, but EnableCDI asserts the features entry as map[string]bool. Use the decoded map type so existing settings survive while CDI is enabled.

Add file-based tests for missing/empty features, existing true and false flags, CDI already enabled or disabled, and repeated load/update/save operations.

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Unit tests passing (make test) — the full suite has the baseline failures described below.
  • Lint checks passing (make lint)
  • Test cases are added for new code paths
  • Commits are signed-off and cryptographically signed.

Testing

  • Three preservation cases fail before the fix and pass afterward.
  • go test -race ./pkg/config/... ./cmd/nvidia-ctk/runtime/... -count=1 passed.
  • make lint: 0 issues.
  • The real CLI preserves existing features and unrelated settings in a temporary daemon.json.

make test has the same four failing packages and nine failing subtests on unmodified upstream and this branch: installer, installer/toolkit, modifier, and nvcdi. These involve missing test driver libraries and CSV hook expectation differences; the full suite is not reported as passing.

@copy-pr-bot

copy-pr-bot Bot commented Sep 5, 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.

@git-jxj
git-jxj force-pushed the fix/preserve-docker-features-when-enabling-cdi branch from 1f25bcd to e3184b6 Compare September 8, 2026 06:15
@henry118

henry118 commented Sep 9, 2026

Copy link
Copy Markdown
Member

/ok to test e3184b6

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.

2 participants