dagster-k8s 0.26.13__py3-none-any.whl → 0.26.15__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dagster-k8s might be problematic. Click here for more details.

@@ -0,0 +1,57 @@
1
+ from collections.abc import Mapping, Sequence
2
+ from dataclasses import dataclass
3
+ from functools import cached_property
4
+ from typing import Any, Optional, Union
5
+
6
+ from dagster import AssetExecutionContext, AssetsDefinition, Definitions, multi_asset
7
+ from dagster.components import Component, ComponentLoadContext, Resolvable, ResolvedAssetSpec
8
+
9
+ from dagster_k8s.pipes import PipesK8sClient, build_pod_body
10
+
11
+
12
+ @dataclass
13
+ class PipesK8sComponent(Component, Resolvable):
14
+ """Component that creates assets backed by kubernetes pod execution via Dagster Pipes."""
15
+
16
+ name: str
17
+ assets: Sequence[ResolvedAssetSpec]
18
+ image: Optional[str] = None
19
+ command: Optional[Union[str, Sequence[str]]] = None
20
+ namespace: Optional[str] = None
21
+ env: Optional[Mapping[str, str]] = None
22
+ base_pod_meta: Optional[Mapping[str, Any]] = None
23
+ base_pod_spec: Optional[Mapping[str, Any]] = None
24
+
25
+ def __post_init__(self):
26
+ # validate that we can build a pod for the given args
27
+ # i.e. image or base_pod_self.image
28
+ build_pod_body(
29
+ pod_name=self.name,
30
+ image=self.image,
31
+ command=self.command,
32
+ env_vars=self.env or {},
33
+ base_pod_meta=self.base_pod_meta,
34
+ base_pod_spec=self.base_pod_spec,
35
+ )
36
+
37
+ @cached_property
38
+ def client(self):
39
+ return PipesK8sClient()
40
+
41
+ def build_defs(self, context: ComponentLoadContext):
42
+ return Definitions(assets=[self.build_asset()])
43
+
44
+ def build_asset(self) -> AssetsDefinition:
45
+ @multi_asset(name=self.name, specs=self.assets)
46
+ def _asset(context: AssetExecutionContext):
47
+ return self.client.run(
48
+ context=context,
49
+ image=self.image,
50
+ command=self.command,
51
+ namespace=self.namespace,
52
+ env=self.env,
53
+ base_pod_meta=self.base_pod_meta,
54
+ base_pod_spec=self.base_pod_spec,
55
+ ).get_results()
56
+
57
+ return _asset
dagster_k8s/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.26.13"
1
+ __version__ = "0.26.15"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dagster-k8s
3
- Version: 0.26.13
3
+ Version: 0.26.15
4
4
  Summary: A Dagster integration for k8s
5
5
  Home-page: https://github.com/dagster-io/dagster/tree/master/python_modules/libraries/dagster-k8s
6
6
  Author: Dagster Labs
@@ -14,7 +14,7 @@ Classifier: License :: OSI Approved :: Apache Software License
14
14
  Classifier: Operating System :: OS Independent
15
15
  Requires-Python: >=3.9,<3.13
16
16
  License-File: LICENSE
17
- Requires-Dist: dagster==1.10.13
17
+ Requires-Dist: dagster==1.10.15
18
18
  Requires-Dist: kubernetes<33
19
19
  Requires-Dist: google-auth!=2.23.1
20
20
  Dynamic: author
@@ -1,5 +1,6 @@
1
1
  dagster_k8s/__init__.py,sha256=1Vi9HXEW9fatVuNzWTr6Oq-JEHmyDrVkonZuELsQ1C0,751
2
2
  dagster_k8s/client.py,sha256=-Ns2saJri4Xxu-OpQ_T93e2K6aVnZvU19tj0iaMmTg8,40901
3
+ dagster_k8s/component.py,sha256=opz-vXIPiyVYlXp4_8VJsqglciO31ywB138zT_DB_Xo,1992
3
4
  dagster_k8s/container_context.py,sha256=399bdqmV3Ce6lNbfuxnhdyJSCy9keRRPJfVjDGn2U4I,22642
4
5
  dagster_k8s/executor.py,sha256=yOvA5KuGi9O5C3KGz6IP8HVPwt2CSD9NU7ITcWxe53M,14872
5
6
  dagster_k8s/job.py,sha256=v7RXYLZHzy2sTC7HYdz_INqbLWyZxUz9QIMwORArjJg,43065
@@ -10,11 +11,11 @@ dagster_k8s/pipes.py,sha256=kb1So6erUgjTDkicALpU1T5mG9xa9n8aeI4lPUVeU2o,34031
10
11
  dagster_k8s/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
11
12
  dagster_k8s/test.py,sha256=cNtcbzxytiZtd01wY5ip7KPi01y0BUQuQhohoIfAFUM,684
12
13
  dagster_k8s/utils.py,sha256=c1bHqh5f1p5RZ0JCT6WEbPPjDvbgUp3pl4nYZRaaI4s,786
13
- dagster_k8s/version.py,sha256=EDf5CcPxrnkRq2ViErwz2GB5gPrihrLuUdZnXlor9gM,24
14
+ dagster_k8s/version.py,sha256=IIhGitgHey00De1EI8U4OzQYe2QXMJMKhPNhRMkJeas,24
14
15
  dagster_k8s/ops/__init__.py,sha256=ur-9GrE_DRfnsFCpYan03qOY9cWbjagC8KHZFZuiCmc,113
15
16
  dagster_k8s/ops/k8s_job_op.py,sha256=CQHtTowGGLAHH5EUGNfqZxDT1MYMqslAJ9u11SzCf-I,22036
16
- dagster_k8s-0.26.13.dist-info/licenses/LICENSE,sha256=TMatHW4_G9ldRdodEAp-l2Xa2WvsdeOh60E3v1R2jis,11349
17
- dagster_k8s-0.26.13.dist-info/METADATA,sha256=pXbhkX0a9rboKfXe63XzpMA7gDwQ0giPW3kDffMbVQc,912
18
- dagster_k8s-0.26.13.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
19
- dagster_k8s-0.26.13.dist-info/top_level.txt,sha256=wFPjskoWPlk2hOLugYCaoZhSiZdUcbCA1QZe9I4dals,12
20
- dagster_k8s-0.26.13.dist-info/RECORD,,
17
+ dagster_k8s-0.26.15.dist-info/licenses/LICENSE,sha256=4lsMW-RCvfVD4_F57wrmpe3vX1xwUk_OAKKmV_XT7Z0,11348
18
+ dagster_k8s-0.26.15.dist-info/METADATA,sha256=xHBAzcWbWfgbZaP_VDadSjAFoE1OddFEJLaXkHnVKZM,912
19
+ dagster_k8s-0.26.15.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
20
+ dagster_k8s-0.26.15.dist-info/top_level.txt,sha256=wFPjskoWPlk2hOLugYCaoZhSiZdUcbCA1QZe9I4dals,12
21
+ dagster_k8s-0.26.15.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.1.0)
2
+ Generator: setuptools (80.7.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2023 Dagster Labs, Inc".
189
+ Copyright 2025 Dagster Labs, Inc.
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.