Skip to content

Commit 69bc805

Browse files
wesjdjsambuc
andauthored
chore: update kr8s to 0.20.7 (#898)
--------- Co-authored-by: Lionel Sambuc <[email protected]>
1 parent 12eddc3 commit 69bc805

File tree

11 files changed

+52
-49
lines changed

11 files changed

+52
-49
lines changed

components/renku_data_services/k8s/clients.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818

1919
from renku_data_services.errors import errors
2020
from renku_data_services.k8s.client_interfaces import K8sCoreClientInterface, K8sSchedudlingClientInterface
21+
from renku_data_services.k8s.models import APIObjectInCluster
2122

2223
if TYPE_CHECKING:
2324
from renku_data_services.k8s.models import (
2425
GVK,
25-
APIObjectInCluster,
2626
Cluster,
2727
ClusterId,
2828
K8sObject,
@@ -253,20 +253,19 @@ async def __list(self, _filter: K8sObjectFilter) -> AsyncIterable[APIObjectInClu
253253
names = [_filter.name] if _filter.name is not None else []
254254

255255
try:
256-
res = await self.__cluster.api.async_get(
256+
res = self.__cluster.api.async_get(
257257
_filter.gvk.kr8s_kind,
258258
*names,
259259
label_selector=_filter.label_selector,
260260
namespace=_filter.namespace,
261261
)
262+
263+
async for r in res:
264+
yield APIObjectInCluster(r, self.__cluster.id)
265+
262266
except (kr8s.ServerError, kr8s.APITimeoutError):
263267
return
264268

265-
if not isinstance(res, list):
266-
res = [res]
267-
for r in res:
268-
yield self.__cluster.with_api_object(r)
269-
270269
async def __get_api_object(self, meta: K8sObjectFilter) -> APIObjectInCluster | None:
271270
return await anext(aiter(self.__list(meta)), None)
272271

@@ -312,8 +311,7 @@ async def get(self, meta: K8sObjectMeta) -> K8sObject | None:
312311

313312
async def list(self, _filter: K8sObjectFilter) -> AsyncIterable[K8sObject]:
314313
"""List all k8s objects."""
315-
results = self.__list(_filter)
316-
async for r in results:
314+
async for r in self.__list(_filter):
317315
yield r.to_k8s_object()
318316

319317

poetry.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/k8s_watcher/poetry.lock

Lines changed: 12 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/k8s_watcher/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ cryptography = "^44.0.1"
7979
kubernetes-asyncio = "^32.0.0"
8080
marshmallow = "^3.26.1"
8181
escapism = "^1.0.1"
82-
kr8s = "^0.18.1"
82+
kr8s = "^0.20.7"
8383
python-box = "^7.0.1"
8484
werkzeug = "^3.1.3"
8585
toml = "^0.10.2"

projects/renku_data_service/poetry.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/renku_data_service/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ cryptography = "^44.0.1"
7979
kubernetes-asyncio = "^32.0.0"
8080
marshmallow = "^3.26.1"
8181
escapism = "^1.0.1"
82-
kr8s = "^0.18.1"
82+
kr8s = "^0.20.7"
8383
python-box = "^7.0.1"
8484
werkzeug = "^3.1.3"
8585
toml = "^0.10.2"

projects/renku_data_tasks/poetry.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/renku_data_tasks/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ cryptography = "^44.0.1"
7979
kubernetes-asyncio = "^32.0.0"
8080
marshmallow = "^3.26.1"
8181
escapism = "^1.0.1"
82-
kr8s = "^0.18.1"
82+
kr8s = "^0.20.7"
8383
python-box="^7.0.1"
8484
werkzeug = "^3.1.3"
8585
toml = "^0.10.2"

projects/secrets_storage/poetry.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/secrets_storage/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ aiofile = "^3.9.0"
7878
# Detected incompatible Protobuf Gencode/Runtime versions when loading authzed/api/v1/core.proto: gencode 5.28.2 runtime 5.27.3.
7979
protobuf = "^5.29.3"
8080
escapism = "^1.0.1"
81-
kr8s = "^0.18.1"
81+
kr8s = "^0.20.7"
8282
python-box = "^7.0.1"
8383
marshmallow = "^3.26.1"
8484
toml = "^0.10.2"

0 commit comments

Comments
 (0)