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.
When running tests locally without setting the
KUBERNETES_VERSIONenvironment variable,pytest-kindfalls 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_VERSIONexplicitly (currently1.30.2as the primary version), but there's no equivalent default for local development.We should update
dask_kubernetes/conftest.pyto automatically look up the latest Kubernetes version from the CI workflow YAML (.github/workflows/operator.yaml) and use it as the default whenKUBERNETES_VERSIONis not set.Then in the
k8s_clusterfixture, fall back to this whenKUBERNETES_VERSIONis not in the environment.This ensures local development stays aligned with CI without requiring developers to remember to set an env variable.