Skip to content

Default to CI Kubernetes version for local test runs #969

@jacobtomlinson

Description

@jacobtomlinson

When running tests locally without setting the KUBERNETES_VERSION environment variable, pytest-kind falls back to its own bundled default Kubernetes version, which can be significantly older than what we test against in CI. This means local test runs may silently use an outdated Kubernetes version, potentially masking compatibility issues or giving developers a false sense of confidence.

In CI we set KUBERNETES_VERSION explicitly (currently 1.30.2 as the primary version), but there's no equivalent default for local development.

We should update dask_kubernetes/conftest.py to automatically look up the latest Kubernetes version from the CI workflow YAML (.github/workflows/operator.yaml) and use it as the default when KUBERNETES_VERSION is not set.

Then in the k8s_cluster fixture, fall back to this when KUBERNETES_VERSION is not in the environment.

This ensures local development stays aligned with CI without requiring developers to remember to set an env variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions