Skip to content

perf(tests): committed kustomizations render once per test process, with kubectl's offline renderers run as real tools #1732

Closed

Description

@dan-petty

Split from #1725 (CI time budget), so that this row is one issue delivered by one pull request.

Friction

33 tests start a real kubectl, which takes 26s summed.

None of them reaches a cluster. The root conftest's session-wide isolate_kubeconfig gives every test an empty kubeconfig. They run kubectl's offline renderers, kubectl kustomize and one kubectl patch --local, and most of them render the same committed k8s/ kustomizations over and over.

Decision

Recorded on #1725 on 2026-10-20: kubectl's offline renderers read only files and reach no cluster, so tests run them for real, like git. There is no maintained Python kustomize, and a recorded render would check the recording rather than the repository.

Remedy

  • docs/TESTING.md and ADR 0007 list the offline renderers with git as programs tests run for real.
  • tests/k8s_manifests.py renders each committed kustomization once per test process and shares the render. A kustomization a test builds under tmp_path renders per call.
  • Every assertion stays.

Acceptance criteria

  • docs/TESTING.md and ADR 0007 name kubectl kustomize and kubectl patch --local as real local tools.
  • The repository-render tests share one render per committed kustomization per process, with the time measured before and after.
  • uv run devops ci passes.

Activity

  1. added this to the v0.2.38 milestone on Oct 20, 2026
  2. added
    type/test
    priority/p0-critical
    scope/ci
    source/agent
    on Oct 20, 2026
  3. dan-petty commented on Oct 20, 2026

    @dan-petty
    OwnerAuthor

    What changed

    #1737, merged into release/v0.2.38 as 2954109.

    Renders each committed Kubernetes kustomization once per test process. This row was split from #1725's CI time budget.

    7 file(s) changed.

    How it was verified

    Check runs at f97b43c:

    • Prune PR DevContainer Images: pass
    • Audit Defect PR Hardening: skipping
    • devops-cli: pass
    • zizmor: pass
    • bandit: pass
    • CodeQL: pass
    • Rule Pack Tests: pass
    • Fail-to-Pass Check: pass
    • Changed-Test Independence: pass
    • Fail-to-Pass Self-Check: pass
    • Tests & Coverage: pass
    • Analyze (python): pass
    • Analyze (actions): pass
    • Static Analysis: pass
    • Dependency Freshness: skipping
    • DevContainer Image: skipping
    • Service Image: skipping

    Acceptance Criteria of docs/agent/tasks/task-1732-kustomize-renders-once.md:

    No Acceptance Criteria section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p0-criticalscope/cisource/agenttype/test

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions