runnable 0.28.4__py3-none-any.whl → 0.28.6__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- extensions/job_executor/k8s.py +4 -9
- runnable/sdk.py +11 -1
- {runnable-0.28.4.dist-info → runnable-0.28.6.dist-info}/METADATA +1 -1
- {runnable-0.28.4.dist-info → runnable-0.28.6.dist-info}/RECORD +7 -7
- {runnable-0.28.4.dist-info → runnable-0.28.6.dist-info}/WHEEL +0 -0
- {runnable-0.28.4.dist-info → runnable-0.28.6.dist-info}/entry_points.txt +0 -0
- {runnable-0.28.4.dist-info → runnable-0.28.6.dist-info}/licenses/LICENSE +0 -0
extensions/job_executor/k8s.py
CHANGED
@@ -7,6 +7,7 @@ from kubernetes import client
|
|
7
7
|
from kubernetes import config as k8s_config
|
8
8
|
from pydantic import BaseModel, ConfigDict, Field, PlainSerializer, PrivateAttr
|
9
9
|
from pydantic.alias_generators import to_camel
|
10
|
+
from rich import print
|
10
11
|
|
11
12
|
from extensions.job_executor import GenericJobExecutor
|
12
13
|
from runnable import console, defaults, utils
|
@@ -133,13 +134,7 @@ class HostPathVolume(BaseModelWIthConfig):
|
|
133
134
|
|
134
135
|
|
135
136
|
class PVCClaim(BaseModelWIthConfig):
|
136
|
-
|
137
|
-
|
138
|
-
model_config = ConfigDict(
|
139
|
-
alias_generator=to_camel,
|
140
|
-
populate_by_name=True,
|
141
|
-
from_attributes=True,
|
142
|
-
)
|
137
|
+
claimName: str
|
143
138
|
|
144
139
|
|
145
140
|
class PVCVolume(BaseModelWIthConfig):
|
@@ -295,7 +290,7 @@ class GenericK8sJobExecutor(GenericJobExecutor):
|
|
295
290
|
|
296
291
|
pod_spec = self._client.V1PodSpec(
|
297
292
|
containers=[base_container],
|
298
|
-
# volumes=[vol.model_dump(by_alias=True) for vol in
|
293
|
+
# volumes=[vol.model_dump(by_alias=True) for vol in spec_volumes],
|
299
294
|
volumes=spec_volumes,
|
300
295
|
tolerations=tolerations,
|
301
296
|
**self.job_spec.template.spec.model_dump(
|
@@ -486,7 +481,7 @@ class K8sJobExecutor(GenericK8sJobExecutor):
|
|
486
481
|
self._volumes.append(
|
487
482
|
PVCVolume(
|
488
483
|
name=self.pvc_claim_name,
|
489
|
-
persistent_volume_claim=PVCClaim(
|
484
|
+
persistent_volume_claim=PVCClaim(claimName=self.pvc_claim_name),
|
490
485
|
)
|
491
486
|
)
|
492
487
|
match self._context.run_log_store.service_name:
|
runnable/sdk.py
CHANGED
@@ -824,12 +824,22 @@ class Pipeline(BaseModel):
|
|
824
824
|
|
825
825
|
class BaseJob(BaseModel):
|
826
826
|
catalog: Optional[Catalog] = Field(default=None, alias="catalog")
|
827
|
-
overrides: Dict[str, Any] = Field(default_factory=dict, alias="overrides")
|
828
827
|
returns: List[Union[str, TaskReturns]] = Field(
|
829
828
|
default_factory=list, alias="returns"
|
830
829
|
)
|
831
830
|
secrets: List[str] = Field(default_factory=list)
|
832
831
|
|
832
|
+
@field_validator("catalog", mode="after")
|
833
|
+
@classmethod
|
834
|
+
def validate_catalog(cls, catalog: Optional[Catalog]) -> Optional[Catalog]:
|
835
|
+
if catalog is None:
|
836
|
+
return None
|
837
|
+
|
838
|
+
if catalog.get:
|
839
|
+
raise Exception("Catalog get is not supported for jobs")
|
840
|
+
|
841
|
+
return catalog
|
842
|
+
|
833
843
|
def get_task(self) -> RunnableTask:
|
834
844
|
raise NotImplementedError
|
835
845
|
|
@@ -8,7 +8,7 @@ extensions/catalog/pyproject.toml,sha256=lLNxY6v04c8I5QK_zKw_E6sJTArSJRA_V-79kta
|
|
8
8
|
extensions/catalog/s3.py,sha256=Sw5t8_kVRprn3uGGJCiHn7M9zw1CLaCOFj6YErtfG0o,287
|
9
9
|
extensions/job_executor/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
extensions/job_executor/__init__.py,sha256=E2R6GV5cZTlZdqA5SVJ6ajZFh4oruM0k8AKHkpOZ3W8,5772
|
11
|
-
extensions/job_executor/k8s.py,sha256=
|
11
|
+
extensions/job_executor/k8s.py,sha256=Mlmuqm1D70gfj471KKZrQF1PeDSCpOiW1bd4vD0pQ-w,16243
|
12
12
|
extensions/job_executor/k8s_job_spec.yaml,sha256=7aFpxHdO_p6Hkc3YxusUOuAQTD1Myu0yTPX9DrhxbOg,1158
|
13
13
|
extensions/job_executor/local.py,sha256=FvxTk0vyxdrbLOAyNkLyjvmmowypabWOSITQBK_ffVE,1907
|
14
14
|
extensions/job_executor/local_container.py,sha256=hyFnpicCp3_87mZsW64P6KSVbz7XMLjwJUWVjeCJ0_I,6627
|
@@ -52,12 +52,12 @@ runnable/names.py,sha256=vn92Kv9ANROYSZX6Z4z1v_WA3WiEdIYmG6KEStBFZug,8134
|
|
52
52
|
runnable/nodes.py,sha256=YU9u7r1ESzui1uVtJ1dgwdv1ozyJnF2k-MCFieT8CLI,17519
|
53
53
|
runnable/parameters.py,sha256=LyQb1d0SaFeI4PJ_yDYt9wArm9ThSPASWb36TwIdDUs,5213
|
54
54
|
runnable/pickler.py,sha256=ydJ_eti_U1F4l-YacFp7BWm6g5vTn04UXye25S1HVok,2684
|
55
|
-
runnable/sdk.py,sha256=
|
55
|
+
runnable/sdk.py,sha256=y3fbK4KAP6FiTF37ickVF9gqaZXrJIgSnHGOSG5ZWpI,33803
|
56
56
|
runnable/secrets.py,sha256=PXcEJw-4WPzeWRLfsatcPPyr1zkqgHzdRWRcS9vvpvM,2354
|
57
57
|
runnable/tasks.py,sha256=X6xijut7ffwpfYDcXoN6y0AcRVd7fWHs676DJ00Kma4,29134
|
58
58
|
runnable/utils.py,sha256=hBr7oGwGL2VgfITlQCTz-a1iwvvf7Mfl-HY8UdENZac,19929
|
59
|
-
runnable-0.28.
|
60
|
-
runnable-0.28.
|
61
|
-
runnable-0.28.
|
62
|
-
runnable-0.28.
|
63
|
-
runnable-0.28.
|
59
|
+
runnable-0.28.6.dist-info/METADATA,sha256=phU1gjJ7dhv5biqBNFOCQv5-rdoLpVtViGFc_cGTIQQ,10047
|
60
|
+
runnable-0.28.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
61
|
+
runnable-0.28.6.dist-info/entry_points.txt,sha256=ioMbWojILtdibYVgh1jXJ00SpK-tX3gy7oVGDq61cSk,1839
|
62
|
+
runnable-0.28.6.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
63
|
+
runnable-0.28.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|