← Back to Pull requests

test: add Kustomize overlay contract tests for ODH operator integration #208

Closed
unknown closed this pull request without merging on Oct 21, 2026 20:19 UTC
View on GitHub
unknown unknown commented on Oct 20, 2026 15:56 UTC
Author

What

Add lightweight tests that validate the Kustomize overlays (default, odh, rhoai) produce the resource inventory and image injection the opendatahub-operator depends on when deploying KSO. These run on every PR and catch manifest changes that would silently break the ODH deployment path.

Why

This closes the inter-dependency coverage gap between the Spark Operator and the opendatahub-operator. Today, if someone changes a Deployment name in config/manager/manager.yaml or restructures a Kustomize overlay, the ODH operator's reconciler would silently fail to deploy KSO — and this would only be caught in full RHOAI e2e post-merge.

Per the RHOAI 3.6 testing commitment guidance: _"component B uses lightweight integration tests in its test suite to ensure it does not break the contracts it is making for component A."_

Tests validate (per overlay: default, odh, rhoai)

  • kustomize build succeeds

  • All 18 required resources exist (CRDs, Deployments, RBAC, Webhooks, Services)

  • Overlay-specific resources exist (NetworkPolicy, PodMonitor)

  • Namespace-scoped resources use the correct namespace

  • Image injection from params.env works (no unsubstituted placeholders)

  • Webhook configurations reference the correct service in the correct namespace

  • Resource kind inventory baseline

  • Standard app.kubernetes.io labels for pod discovery

  • ODH/RHOAI overlays exclude Namespace resource (managed by ODH operator)

  • ODH/RHOAI overlays have app.kubernetes.io/part-of label

  • params.env key consistency across all overlays
  • Changes

  • test/overlay/overlay_contract_test.go — New test file (22 test cases)

  • Makefile — Added make overlay-contract-check target

  • .github/workflows/integration.yaml — Wired into CI
  • Run locally

    make overlay-contract-check
    

    Diff: 230 lines (+172 / -58) across 2 files Reviewer: RobuRishabh Review duration: 1703m
    All Vouch review confidence checks passed
    Residual risk 0.15 = 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 · 230 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.326
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #208"
    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: 37% (MEDIUM) · Higher = larger blast radius
    37%
    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.6% · Safe to merge
    14.6%