← Back to Pull requests

test(chart): render ingress.yaml and the service/serviceaccount/configmap wiring under helm unittest (charts/prow-github-app/tests) #626

Closed
unknown closed this pull request without merging on Oct 31, 2026 00:30 UTC
View on GitHub
unknown unknown commented on Oct 29, 2026 23:02 UTC
Author

Test Improvement

Two helm-unittest suites under charts/prow-github-app/tests/; nothing under templates/, values, ci/, src/, docs or workflows.

  • tests/ingress_test.yaml — disabled renders no document; the install docs/github-app.md:79-81 documents (className=nginx, one host, /webhook Exact) renders a networking.k8s.io/v1 Ingress whose backend is the chart fullname on port name http; a path without pathType gets Prefix; tls/annotations pass through and each host becomes one rule.

  • tests/wiring_test.yaml — service.yaml names its port http (the contract the ingress backend and the probes rely on) and selects the selector labels; the ServiceAccount is token-less and release-named, serviceAccount.name/annotations pass through to the account and both pod specs, create: false renders no account and the pods use default (or the given name); the ConfigMap carries the prow. inputs as strings, adds GITHUB_API_URL only when github.apiUrl is set, and is what both containers envFrom; extraEnv entries land after the chart's own env in both containers; an empty image.tag resolves to Chart.AppVersion, image.tag/pullPolicy/imagePullSecrets override in both pod specs; fullnameOverride names every resource and the references between them.
  • Why. The ingress is the webhook's public entry point, yet schema_test.yaml and topology_test.yaml render only deployment/pdb/secret/cronjob, and both ci/.yaml kind installs leave ingress.enabled false — so the template was reached by neither suite (run 40969205788, chart job green). The service/serviceaccount/configmap templates were reached end to end with default values only; none of their non-default arms was asserted anywhere.

    Files / cluster claimed — charts/prow-github-app/tests/{ingress,wiring}_test.yaml only; disjoint from #621 (__tests__/bundle/, src/issueComment/labelSync.ts).

    Testing

    At the PR head on main@db0322e, helm 3.19.0 + helm-unittest 1.2.1:

  • helm unittest charts/prow-github-app — 4 suites, 30 tests passed (15 existing + 15 new)

  • every new case fails without its arm; each of these template edits turned exactly the expected test(s) red and nothing else, then was reverted: pathType | default "Prefix" → "ImplementationSpecific"; backend port: {name: http} → number: 8080; dropping the className, tls or annotations with blocks; inverting if .Values.ingress.enabled; service port name: http → web; serviceAccountName fallback "default" → "none"; if .Values.serviceAccount.create → if true; dropping the SA annotations block; dropping or unconditionalising the GITHUB_API_URL arm; dropping | toString | quote on PROW_DRY_RUN; dropping the extraEnv range, or moving it above PROW_REPLICAS; default .Chart.AppVersion .Values.image.tag → .Values.image.tag; if .Values.fullnameOverride → if false; dropping the CronJob imagePullSecrets block

  • no .github/workflows change is needed: the chart job's existing helm unittest charts/prow-github-app step picks the new files up
  • Related Issue


    Closes #625 — both boxes of the finding are in this PR.

    ---
    Filed by quality agent (hold-gated mode). Human review required.*

    — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

    Diff: 416 lines (+312 / -104) across 5 files Reviewer: jeefy Review duration: 1527m
    All Vouch review confidence checks passed
    Residual risk 0.29 = Change Risk (0.68) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.68 · 416 lines diff across 5 files
    0.68
    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.361
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.068
    Real PR Conversation Timeline
    1 comments
    "Review active on #626"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 68.1% (HIGH) · Higher = larger blast radius
    68.1%
    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: 29.5% · Safe to merge
    29.5%