← Back to Pull requests

fix(ci): complete weekly scan of NCCL preflight images #3431

Closed
unknown closed this pull request without merging on Oct 27, 2026 13:06 UTC
View on GitHub
unknown unknown commented on Oct 27, 2026 00:53 UTC
Author

Summary

The weekly image scan now completes for the two NVSentinel NCCL preflight images by scanning them on a larger runner, and the Slack summary reports any scan leg that dies instead of omitting it.

Motivation / Context

Recent weekly runs have lost both NCCL legs: the runner receives a shutdown signal partway through the scan and the images go unchecked. Sampling memory and disk every 15 seconds in two diagnostic dispatches showed the cause is memory, not disk. grype holds about 28 GiB while it catalogs these images (peak RSS about 15 GiB plus 13 GiB swapped), and a 16 GiB ubuntu-24.04 runner with 3 GiB of swap is killed once swap fills. Disk never dropped below 75 GiB free.

With enough memory the scans finish, and they surface findings the weekly report has been missing: 52 HIGH/CRITICAL fixable matches in preflight-nccl-loopback and 151 in preflight-nccl-allreduce.

The summary also hid the failure. A leg that dies before uploading leaves no artifact, so the Slack post never named it, and a leg that hits its timeout concludes cancelled, which made needs.scan.result cancelled and skipped the summary job entirely.

Fixes: #3249
Related: N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

  • New feature (non-breaking change that adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to change)

  • Documentation update

  • Refactoring (no functional changes)

  • Build/CI/tooling
  • Component(s) Affected

  • CLI (cmd/aicr, pkg/cli)

  • API server (cmd/aicrd, pkg/server)

  • Recipe engine / data (pkg/recipe)

  • Bundler and deployers (pkg/bundler, pkg/component)

  • Collectors / snapshotter (pkg/collector, pkg/snapshotter)

  • Validator (pkg/validator)

  • Core libraries (pkg/errors, pkg/k8s)

  • Docs/examples (docs/, examples/)

  • Other: .github/workflows/vuln-scan-images.yaml, .github/actionlint.yaml
  • Implementation Notes

  • Larger runner for the two NCCL legs only. They are marked large: true in the matrix and run on linux-amd64-cpu16 (NVIDIA self-hosted, 16 vCPU, 61 GiB RAM, 141 GiB disk); every other image stays on ubuntu-24.04. cpu8 (30 GiB) is too close to the 28 GiB working set. The workflow runs only on its schedule or a manual dispatch, so no pull-request code reaches the self-hosted runner, and the scan job's token is contents: read / packages: read.

  • Registry source for the large images. registry: makes grype fetch layers directly rather than pull, docker save and extract, which halved the scan time in the diagnostic runs.

  • Removed the "Free disk space" step. Its stated reason was the NCCL images on a hosted runner, which no longer applies.

  • Summary reports incomplete legs. The notify job lists this attempt's Scan (...) jobs through the API (actions: read) and adds each one that did not succeed as "scan did not complete (<conclusion>)". It posts when any leg is incomplete, even with no HIGH findings.

  • Summary runs whenever the run is not cancelled. if: ${{ !cancelled() }} replaces always() && needs.scan.result != 'cancelled', so a single leg timing out no longer suppresses the report.

  • Expect a louder first report. The 52 and 151 HIGH+ findings will appear in the first Slack post after merge and likely need VEX triage.
  • Testing

    actionlint -color -shellcheck=
    yamllint -c .yamllint.yaml .github/workflows/vuln-scan-images.yaml .github/actionlint.yaml
    tools/check-runner-labels
    go test ./tests/releasepolicy/... ./pkg/recipe/...
    

    CI evidence, all dispatched from temporary branches:

    | Run | Setup | loopback | allreduce |
    |---|---|---|---|
    | 40033072898 | hosted, as on main | killed (OOM) | killed (OOM) |
    | 40039453493 | hosted + 48 GiB swap, docker daemon | 20m 31s | 22m 34s |
    | 40039453493 | hosted + 48 GiB swap, registry | 9m 59s | 9m 56s |
    | 40427248166 | this workflow file, cpu16, registry | 4m 50s | 4m 34s |

    Run 40427248166 ran this PR's workflow file end to end (minus the event-exporter entry from #3371, which landed meanwhile) and every job succeeded; the whole workflow took 13 minutes. The notify logic was exercised locally with a stubbed gh against the real jobs JSON of run 39732382492: it lists both dead NCCL legs and posts with zero HIGH findings, and still skips on a clean run.

    make qualify does not complete in my local sandbox (shell tests need mktemp outside the sandbox; 13 release-policy tests need GNU timeout, and fail identically on main). This PR changes no Go code.

    Risk Assessment

  • Low — Isolated change, well-tested, easy to revert

  • Medium — Touches multiple components or has broader impact

  • High — Breaking change, affects critical paths, or complex rollout
  • Rollout notes: First dependency on a self-hosted CPU runner label in this repo. If linux-amd64-cpu16 capacity is unavailable, the two NCCL legs queue rather than fail, which delays the weekly summary until they are picked up.

    Checklist

  • Tests pass locally (make test with -race) (no Go changes; ran the workflow-parsing tests, see Testing)

  • Linter passes (make lint) (ran the YAML-relevant gates: actionlint, yamllint, runner labels)

  • I did not skip/disable tests to make CI green

  • I added/updated tests for new functionality

  • I updated docs if user-facing behavior changed

  • Changes follow existing patterns in the codebase

  • Commits are signed off and cryptographically signed (git commit -s -S) — GPG signing info
  • Diff: 650 lines (+487 / -163) across 8 files Reviewer: yuanchen8911 Review duration: 732m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    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%
    56%
    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.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3431"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 52% (MEDIUM) · Higher = larger blast radius
    52%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 22.5% · Safe to merge
    22.5%
    Repository