← Back to Pull requests

fix(kwok): skip the SR-IOV pre-delete hook in NVKE cleanup #3453

Closed
unknown closed this pull request without merging on Oct 27, 2026 23:29 UTC
View on GitHub
unknown unknown commented on Oct 27, 2026 22:49 UTC
Author

Summary

KWOK cleanup now uninstalls releases that enable the network-operator chart's sriov-network-operator subchart with --no-hooks, so the NVKE Tier 2 lanes (gb200-nvke-ubuntu-training and gb200-nvke-ubuntu-training-kubeflow) no longer time out in cleanup.

Motivation / Context

Both NVKE KWOK lanes pass scheduling validation and then fail cleanup. The SR-IOV subchart (network-operator 26.7.0) ships a pre-delete hook Job with tolerations hardcoded to the control-plane taints, not configurable from values. It never schedules on the KWOK cluster, so helm uninstall network-operator hits the 60s cleanup timeout.

Fixes: #3452
Related: #3389

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: kwok/scripts/lib/cleanup.sh (KWOK CI cleanup)
  • Implementation Notes

  • sriov_subchart_enabled reads a release's values (helm get values) and reports whether sriovNetworkOperator.enabled is true. Only those releases get --no-hooks; every other release keeps its hooks.

  • The skipped hook only deletes the SriovOperatorConfig so the operator can remove its webhooks. Nothing runs on KWOK to act on it, and the cleanup's namespace sweep removes the rest.

  • The values read is bounded with timeout 30s. A read failure or timeout counts as "not enabled", so a release keeps its hooks rather than skipping them by mistake.

  • Real clusters are unaffected: this is KWOK cleanup only, and a live NVKE teardown uninstalls network-operator cleanly with its hook.

  • Not in scope: KWOK still disables sriov-ib-networks for NVKE because no operator runs there to create the nv-ipam IPPool CRD (noted in #3452).
  • Testing

    bash kwok/scripts/lib/cleanup_test.sh
    shellcheck -x -P kwok/scripts/lib kwok/scripts/lib/cleanup.sh kwok/scripts/lib/cleanup_test.sh
    

  • cleanup_test.sh gains a case: a release enabling the SR-IOV subchart is uninstalled with --no-hooks, and no other release is. All cases pass; the new case fails against the previous cleanup.sh.

  • shellcheck -x is clean.

  • make qualify was not run: the change is limited to a KWOK CI shell script and its test, which no Go test, lint, or e2e target exercises. KWOK Tier 2 is diff-aware and does not select the NVKE leaves for a change limited to kwok/scripts/, so the end-to-end check was the Tier 3 KWOK run on main after merge. Before this change, Tier 3 on 864dd60 failed both NVKE leaves only with the helm deployer and passed them with the Argo CD and Flux deployers.

  • Post-merge result: KWOK Cluster Validation run 40602496711 on a44f720 passed. gb200-nvke-ubuntu-training and gb200-nvke-ubuntu-training-kubeflow passed with the helm deployer, cleanup included, and all 12 NVKE recipe/deployer jobs passed. The run had no failed jobs.
  • 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: N/A (CI-only).

    Checklist

  • Tests pass locally (make test with -race)

  • Linter passes (make lint)

  • 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: 533 lines (+399 / -134) across 6 files Reviewer: yuanchen8911 Review duration: 40m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 533 lines diff across 6 files
    0.48
    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.376
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3453"
    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: 47.9% (MEDIUM) · Higher = larger blast radius
    47.9%
    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: 18.9% · Safe to merge
    18.9%
    Repository