← Back to Pull requests

AUTOSCALE-1061: run generic kubelet tests for both Azure and EC2 CRDs #74

Closed
unknown closed this pull request without merging on Nov 17, 2026 17:47 UTC
View on GitHub
unknown unknown commented on Nov 06, 2026 14:03 UTC
Author

The EC2 and Azure NodeClass wrappers embed the same KubeletConfiguration, but the 52 kubelet cases only ran against EC2. This PR lets a suite run against several CRDs and makes the kubelet suite one of them.

Changes

  • Runner package

  • - moves the runner from test/schema/_test.go into test/schema/runner/
    - make test runs its unit tests and make test-schema only runs the suite
  • Generic suites

  • - a suite can list targets (crdName, version) instead of crdName and version
    - documents omit apiVersion and kind, which are set per target
    - the kubelet suite becomes nodeclasses.kubelet.testsuite.yaml with an EC2 and an Azure target
    - suite files no longer carry the stable. prefix, because the suites are not split by feature set the way hypershift or openshift/api do it
  • Test names and junit

  • - make test-schema writes one junit file per kube-apiserver version, but all of them shared one testsuite name and testcase classname, so aggregated views merged the three runs and lost the version. The suite is now named NodeClass CRD schema (k8s <version>), from SCHEMA_TEST_K8S_VERSION
    - cases repeated the API group and the Kind the suite already targets. [karpenter.hypershift.openshift.io/v1, Resource=openshiftec2nodeclasses] OpenshiftEC2NodeClass kubelet validation becomes [openshiftec2nodeclasses/v1] kubelet validation
    - longest case name 243 -> 182 characters, average 187 -> 120

    Before vs after

    | | Before (#72) | After |
    |---|---|---|
    | Kubelet suite | EC2 only | EC2 and Azure targets |
    | Kubelet cases | 52 | 52, same names and expectations |
    | Specs run | 107 | 159 (+52 Azure) |
    | Suite file | 857 lines | 489 lines |
    | Runner | test/schema/
    _test.go, globals, envtest tag | test/schema/runner, Env, no tag |
    | make test | ./pkg/... | also ./test/schema/runner/... |
    | make test-schema | ./test/schema/... | ./test/schema (suite only) |
    | Case name | [karpenter.hypershift.openshift.io/v1, Resource=openshiftec2nodeclasses] OpenshiftEC2NodeClass kubelet validation On Create When ... | [openshiftec2nodeclasses/v1] kubelet validation On Create When ... |
    | Junit suite | NodeClass CRD Schema Suite, the same for every version | NodeClass CRD schema (k8s 1.37.1) |

  • Case contents are unchanged. The suite is shorter because cases no longer repeat apiVersion, kind and the EC2 selector terms, which the CRD does not require. I compared old and new documents with those stripped and found no differences.

  • All 52 cases pass against the Azure CRD. No CRD changes.

  • Cases that depend on an omitted or empty spec, differ between the CRDs, or patch a field not every target has stay in per-CRD suites.

  • make test-schema SCHEMA_TEST_K8S_VERSIONS=1.37.1 passes with 159 specs and the junit carries the version.
  • Diff: 353 lines (+264 / -89) across 4 files Reviewer: linkvt Review duration: 16064m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.66) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.66 · 353 lines diff across 4 files
    0.66
    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.351
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.066
    Real PR Conversation Timeline
    1 comments
    "Review active on #74"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    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: 65.7% (HIGH) · Higher = larger blast radius
    65.7%
    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: 25.9% · Safe to merge
    25.9%