Skip to content

Commit 0d176ae

Browse files
authored
deprecate dask and kubernetes schedulers (#1375)
* deprecate dask and kubernetes schedulers * changelog
1 parent e20313f commit 0d176ae

File tree

5 files changed

+16
-75
lines changed

5 files changed

+16
-75
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -124,74 +124,6 @@ jobs:
124124
PYTEST_EXECUTORS=multiprocessing,sequential,multiprocessing_with_pickling,sequential_with_pickling \
125125
uv run --frozen python -m pytest -sv test_all.py test_multiprocessing.py
126126
127-
cluster_tools_kubernetes:
128-
needs: changes
129-
if: ${{ needs.changes.outputs.cluster_tools == 'true' }}
130-
runs-on: ubuntu-latest
131-
timeout-minutes: 30
132-
strategy:
133-
matrix:
134-
python-version: ["3.13", "3.12", "3.11", "3.10"]
135-
defaults:
136-
run:
137-
working-directory: cluster_tools
138-
steps:
139-
- uses: actions/checkout@v4
140-
- name: Install uv
141-
uses: astral-sh/setup-uv@v6
142-
with:
143-
enable-cache: true
144-
cache-dependency-glob: "cluster_tools/uv.lock"
145-
- name: Set up Python ${{ matrix.python-version }}
146-
run: uv python install ${{ matrix.python-version }}
147-
- name: Setup Kubernetes-in-Docker
148-
run: |
149-
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64
150-
chmod +x ./kind
151-
sed -i "s#__PATH__#$(pwd)#g" tests/cluster-config.yaml
152-
./kind create cluster --config=tests/cluster-config.yaml
153-
./kind export kubeconfig
154-
155-
docker build \
156-
--build-arg PYTHON_VERSION=${{ matrix.python-version }} \
157-
-f tests/Dockerfile \
158-
-t scalableminds/cluster-tools:latest \
159-
.
160-
./kind load docker-image scalableminds/cluster-tools:latest
161-
- name: Install dependencies (without docker)
162-
run: uv sync --all-extras --frozen
163-
- name: "Run Kubernetes"
164-
run: |
165-
cd tests
166-
PYTEST_EXECUTORS=kubernetes uv run --frozen python -m pytest -sv test_all.py test_kubernetes.py
167-
168-
cluster_tools_dask:
169-
needs: changes
170-
if: ${{ needs.changes.outputs.cluster_tools == 'true' }}
171-
runs-on: ubuntu-latest
172-
timeout-minutes: 30
173-
strategy:
174-
matrix:
175-
python-version: ["3.13", "3.12", "3.11", "3.10"]
176-
defaults:
177-
run:
178-
working-directory: cluster_tools
179-
steps:
180-
- uses: actions/checkout@v4
181-
- name: Install uv
182-
uses: astral-sh/setup-uv@v6
183-
with:
184-
enable-cache: true
185-
cache-dependency-glob: "cluster_tools/uv.lock"
186-
- name: Set up Python ${{ matrix.python-version }}
187-
run: uv python install ${{ matrix.python-version }}
188-
- name: Install dependencies (without docker)
189-
run: uv sync --all-extras --frozen
190-
- name: "Run Dask"
191-
run: |
192-
cd tests
193-
PYTEST_EXECUTORS=dask uv run --frozen python -m pytest -sv test_all.py test_dask.py
194-
195127
webknossos_linux:
196128
needs: changes
197129
if: |
@@ -347,8 +279,6 @@ jobs:
347279
needs:
348280
- cluster_tools_slurm
349281
- cluster_tools_multiprocessing
350-
- cluster_tools_kubernetes
351-
- cluster_tools_dask
352282
- webknossos_linux
353283
- webknossos_windows
354284
runs-on: ubuntu-latest
@@ -406,8 +336,6 @@ jobs:
406336
needs:
407337
- cluster_tools_slurm
408338
- cluster_tools_multiprocessing
409-
- cluster_tools_kubernetes
410-
- cluster_tools_dask
411339
- webknossos_linux
412340
- webknossos_windows
413341
if: |
@@ -443,8 +371,6 @@ jobs:
443371

444372
complete:
445373
needs:
446-
- cluster_tools_dask
447-
- cluster_tools_kubernetes
448374
- cluster_tools_multiprocessing
449375
- cluster_tools_slurm
450376
- webknossos_linux

cluster_tools/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ For upgrade instructions, please check the respective *Breaking Changes* section
1010
[Commits](https://github.com/scalableminds/webknossos-libs/compare/v2.5.0...HEAD)
1111

1212
### Breaking Changes
13+
- Deprecate the `dask` and `kubernetes` executors. They will be removed in a future version. [#1375](https://github.com/scalableminds/webknossos-libs/pull/1375)
1314

1415
### Added
1516

cluster_tools/cluster_tools/executors/dask.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
TypeVar,
1515
cast,
1616
)
17+
from warnings import warn
1718
from weakref import ReferenceType, ref
1819

1920
from typing_extensions import ParamSpec
@@ -117,6 +118,12 @@ def __init__(
117118
)
118119
exit()
119120

121+
warn(
122+
"Dask support is deprecated and will be removed in a future version.",
123+
category=DeprecationWarning,
124+
stacklevel=2,
125+
)
126+
120127
self.client = client
121128
self.pending_futures = set()
122129
self.job_resources = job_resources

cluster_tools/cluster_tools/schedulers/kube.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from pathlib import Path
99
from typing import Any, Literal
1010
from uuid import uuid4
11+
from warnings import warn
1112

1213
from cluster_tools.schedulers.cluster_executor import ClusterExecutor
1314

@@ -58,6 +59,12 @@ def __init__(
5859
)
5960
exit()
6061

62+
warn(
63+
"Kubernetes support is deprecated and will be removed in a future version.",
64+
category=DeprecationWarning,
65+
stacklevel=2,
66+
)
67+
6168
super().__init__(
6269
debug=debug,
6370
keep_logs=keep_logs,

cluster_tools/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ set -eEuo pipefail
44
cd tests
55
PYTEST_EXECUTORS=multiprocessing,multiprocessing_with_pickling,sequential uv run --frozen python -m pytest -sv test_all.py test_multiprocessing.py
66

7-
echo "Tests for the kubernetes, dask and SLURM executors are only run in the CI"
7+
echo "Tests for the SLURM executors are only run in the CI"

0 commit comments

Comments
 (0)