Default to CI Kubernetes version for local test runs
- Dominant language
- Python
- Stars
- 324
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.