← Back to Pull requests

Clear the docker default runtime when setAsDefault=false #2156

Closed
unknown closed this pull request without merging on Nov 03, 2026 07:09 UTC
View on GitHub
unknown unknown commented on Oct 20, 2026 14:21 UTC
Author

Description

#1256 made AddRuntime for containerd and cri-o clear the default runtime when the runtime being added is the current default and setAsDefault is false. Docker was not included, so a previous "default-runtime": "nvidia" stayed in daemon.json after configuring docker without --set-as-default.

This adds the same else branch to the docker implementation: when setAsDefault is false and default-runtime equals the runtime being added, the key is removed and docker falls back to its own default. A different existing default, for example one set by the user to another runtime, is left alone.

Behaviour change to be aware of: a default-runtime: nvidia that was set by hand is removed by nvidia-ctk runtime configure --runtime=docker without --set-as-default, as it already is for containerd and cri-o.

Closes #2155

Checklist

  • No secrets, sensitive information, or unrelated changes

  • Unit tests passing (make test) (ran go test ./pkg/config/engine/... ./cmd/nvidia-ctk/runtime/... ./cmd/nvidia-ctk-installer/...)

  • Lint checks passing (make lint) (ran golangci-lint run ./pkg/config/engine/docker/...: 0 issues)

  • Test cases are added for new code paths

  • Commits are signed-off and cryptographically signed
  • Testing

    New case in TestUpdateConfigDefaultRuntime (default is NAME, NAME added with setAsDefault=false, expects no default-runtime) fails on main and passes with this change. The installer tests, which configure docker with several runtimes and one default, still pass. Go 1.27.2, macOS arm64. Not tested against a running docker daemon.

    Diff: 216 lines (+162 / -54) across 2 files Reviewer: cdesiniotis Review duration: 19727m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 216 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.322
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #2156"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.6% (MEDIUM) · Higher = larger blast radius
    36.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.5% · Safe to merge
    14.5%