Skip to content

Enable nvca test execution in the GitHub Actions Bazel matrix #238

Description

@balajinvda

Background

The nvca row in .github/workflows/bazel.yml is build-only (tests_skip: true). The inline comment attributes this to TestReconcile_ModelCache (pkg/storage) failing "under envtest >= 1.30" because the test faked a JobSuccessCriteriaMet condition on a NonIndexed Job with no SuccessPolicy, which the apiserver rejects.

Findings

  • The failure is specific to k8s 1.30-1.33. On k8s 1.34+ the apiserver relaxed that restriction and instead requires SuccessCriteriaMet before Complete (and rejects CompletionTime without Complete).
  • nvca now pins envtest 1.34 (scripts/setup_envtest, K8S_MAJ_MIN_VERSION=1.34) and vendors k8s.io/api v0.35.4.
  • The reconciler detects completion via CompletionTime + Succeeded, not the Job conditions.
  • A version-adaptive test fix makes pkg/storage pass on both 1.30.3 and 1.34.1 (linked PR).

Ask

Once the test fix lands, enable test execution for the nvca row:

  1. Provision envtest assets (KUBEBUILDER_ASSETS) in the matrix job for subtrees that need them. nvca resolves them via scripts/setup_envtest / tools/ci/setup-subtree-envtest. Alternatively scope the run so requires-kubebuilder/external-tagged tests are filtered and the non-envtest unit tests still run.
  2. Remove tests_skip: true and the stale ">= 1.30" comment from the nvca matrix row.
  3. Confirm bazel test //... passes for nvca on GHA.

Note: the envtest tests are tagged requires-kubebuilder/external; GHA must provide the kube-apiserver + etcd binaries or filter those tests, otherwise they fail on missing KUBEBUILDER_ASSETS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions