execution-plane-client 0.1.15__tar.gz → 0.1.17__tar.gz
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.
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/PKG-INFO +1 -1
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/_version.py +2 -2
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/catalog.py +1 -2
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/commands/clusters.py +0 -6
- execution_plane_client-0.1.17/commands/work.py +109 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/models/execution_target.py +1 -1
- execution_plane_client-0.1.15/commands/work.py +0 -43
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/.gitignore +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/LICENSE +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/README.md +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/__init__.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/commands/__init__.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/commands/base.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/commands/control.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/commands/credentials.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/commands/results.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/commands/targets.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/errors.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/handlers.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/models/__init__.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/models/cluster.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/models/shared.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/models/work_item.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/protocol.py +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/py.typed +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/pyproject.toml +0 -0
- {execution_plane_client-0.1.15 → execution_plane_client-0.1.17}/registry.py +0 -0
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.1.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 1,
|
|
21
|
+
__version__ = version = '0.1.17'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 1, 17)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
|
|
5
5
|
from execution_plane_client.commands.base import CommandPayload
|
|
6
|
-
from execution_plane_client.commands.clusters import ClusterDelete,
|
|
6
|
+
from execution_plane_client.commands.clusters import ClusterDelete, ClusterRegister, ClusterUpdate
|
|
7
7
|
from execution_plane_client.commands.control import CancelCommand, Completion
|
|
8
8
|
from execution_plane_client.commands.credentials import CredentialResolve
|
|
9
9
|
from execution_plane_client.commands.targets import TargetDelete, TargetHealth, TargetRegister, TargetUpdate
|
|
@@ -31,7 +31,6 @@ class CommandCatalog:
|
|
|
31
31
|
Completion,
|
|
32
32
|
CredentialResolve,
|
|
33
33
|
ClusterRegister,
|
|
34
|
-
ClusterProvision,
|
|
35
34
|
ClusterUpdate,
|
|
36
35
|
ClusterDelete,
|
|
37
36
|
TargetRegister,
|
|
@@ -61,12 +61,6 @@ class ClusterRegister(ClusterConfigBase, ResourceIdentity, CommandPayload):
|
|
|
61
61
|
return self
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
class ClusterProvision(ClusterRegister):
|
|
65
|
-
"""Provision through the same cluster and default-target reconciler."""
|
|
66
|
-
|
|
67
|
-
command_type: ClassVar[str] = "cluster.provision"
|
|
68
|
-
|
|
69
|
-
|
|
70
64
|
class ClusterDelete(ResourceIdentity, CommandPayload):
|
|
71
65
|
"""Disable and drain an existing cluster addressed by id."""
|
|
72
66
|
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"""Scheduling commands for the SDK-owned container gRPC contract."""
|
|
2
|
+
|
|
3
|
+
from typing import Annotated, ClassVar, Literal
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from pydantic import Field, StrictStr, field_validator
|
|
7
|
+
|
|
8
|
+
from execution_plane_client.commands.base import CommandPayload
|
|
9
|
+
from execution_plane_client.protocol import PositiveInt, WireModel, validate_json
|
|
10
|
+
|
|
11
|
+
StepIdentity = Annotated[StrictStr, Field(min_length=1, max_length=256, pattern=r"^[A-Za-z0-9._:-]+$")]
|
|
12
|
+
CREDENTIAL_RECIPE_ID_PATTERN = r"^[a-z][a-z0-9-]{0,62}(?:\.[a-z][a-z0-9-]{0,62})+$"
|
|
13
|
+
CredentialRecipeId = Annotated[
|
|
14
|
+
StrictStr,
|
|
15
|
+
Field(min_length=1, max_length=256, pattern=CREDENTIAL_RECIPE_ID_PATTERN),
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class WorkCredentialBinding(WireModel):
|
|
20
|
+
"""One Plugin SDK recipe-to-AO credential mapping for a work item."""
|
|
21
|
+
|
|
22
|
+
credential_recipe_id: CredentialRecipeId = Field(
|
|
23
|
+
description="Qualified Plugin SDK CredentialRecipe identifier that the workload may request at runtime."
|
|
24
|
+
)
|
|
25
|
+
credential_ref: UUID = Field(
|
|
26
|
+
repr=False,
|
|
27
|
+
description="Opaque AO credential reference; EP resolves it only after the workload requests this recipe.",
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class WorkloadInvocation(WireModel):
|
|
32
|
+
"""Public invocation data; EP supplies the attempt ID and credential resolver.
|
|
33
|
+
|
|
34
|
+
Script environment variables remain ordinary step inputs. Credential-file
|
|
35
|
+
delivery is not implemented yet, so callers cannot supply secret values or
|
|
36
|
+
claim that arbitrary file paths have been mounted by EP.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
workflow_run_id: StepIdentity = Field(description="Caller-owned identity of the workflow run containing this step.")
|
|
40
|
+
step_revision_id: StepIdentity = Field(
|
|
41
|
+
description="Workload-advertised revision of the step implementation to execute."
|
|
42
|
+
)
|
|
43
|
+
inputs: dict[str, object] = Field(
|
|
44
|
+
description="Step inputs defined by the selected workload; never use this field for credential bindings."
|
|
45
|
+
)
|
|
46
|
+
runtime_context: dict[str, object] = Field(
|
|
47
|
+
default_factory=dict,
|
|
48
|
+
description="Non-secret execution context supplied to the workload; not for credential bindings.",
|
|
49
|
+
)
|
|
50
|
+
credential_bindings: list[WorkCredentialBinding] = Field(
|
|
51
|
+
default_factory=list,
|
|
52
|
+
max_length=16,
|
|
53
|
+
repr=False,
|
|
54
|
+
description="Host-side recipe-to-reference bindings; never plugin inputs or runtime context.",
|
|
55
|
+
)
|
|
56
|
+
timeout_seconds: Annotated[
|
|
57
|
+
PositiveInt,
|
|
58
|
+
Field(
|
|
59
|
+
le=86_400,
|
|
60
|
+
description="Maximum workload execution time in seconds, including SDK streaming but excluding cleanup.",
|
|
61
|
+
),
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
@field_validator("inputs", "runtime_context", mode="before")
|
|
65
|
+
@classmethod
|
|
66
|
+
def check_json(cls, value: object) -> object:
|
|
67
|
+
"""Keep nested invocation data finite, portable, and bounded."""
|
|
68
|
+
return validate_json(value)
|
|
69
|
+
|
|
70
|
+
@field_validator("credential_bindings")
|
|
71
|
+
@classmethod
|
|
72
|
+
def check_unique_recipe_ids(cls, value: list[WorkCredentialBinding]) -> list[WorkCredentialBinding]:
|
|
73
|
+
"""Reject duplicate recipe IDs before host-side credential resolution."""
|
|
74
|
+
recipe_ids = [binding.credential_recipe_id for binding in value]
|
|
75
|
+
if len(set(recipe_ids)) != len(recipe_ids):
|
|
76
|
+
message = "Credential bindings must have unique credential recipe IDs"
|
|
77
|
+
raise ValueError(message)
|
|
78
|
+
return value
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class WorkExecute(CommandPayload):
|
|
82
|
+
"""Schedule one workload implementing the SDK container service."""
|
|
83
|
+
|
|
84
|
+
command_type: ClassVar[str] = "work.execute"
|
|
85
|
+
|
|
86
|
+
image: Annotated[
|
|
87
|
+
StrictStr,
|
|
88
|
+
Field(
|
|
89
|
+
min_length=1,
|
|
90
|
+
max_length=2048,
|
|
91
|
+
description="OCI image reference for the isolated cold-start workload container.",
|
|
92
|
+
),
|
|
93
|
+
]
|
|
94
|
+
selectors: dict[StrictStr, StrictStr] = Field(
|
|
95
|
+
default_factory=dict,
|
|
96
|
+
description="Exact label requirements used to select an execution target; all keys and values must match.",
|
|
97
|
+
)
|
|
98
|
+
invocation: WorkloadInvocation = Field(
|
|
99
|
+
repr=False,
|
|
100
|
+
description="Validated workload invocation, including host-side credential bindings.",
|
|
101
|
+
)
|
|
102
|
+
output_config: dict[str, str] | None = Field(
|
|
103
|
+
default=None,
|
|
104
|
+
description="Optional result-field allowlist mapping output names to workload result keys.",
|
|
105
|
+
)
|
|
106
|
+
workload_type: Literal["container"] = Field(
|
|
107
|
+
default="container",
|
|
108
|
+
description="Workload execution family; container is the only supported value.",
|
|
109
|
+
)
|
|
@@ -190,7 +190,7 @@ class KubernetesTargetPlacement(CommandKubernetesPlacement):
|
|
|
190
190
|
|
|
191
191
|
|
|
192
192
|
class ExecutionTargetCreate(BaseModel):
|
|
193
|
-
"""A Kubernetes target on the single cluster
|
|
193
|
+
"""A Kubernetes target on the single cluster registered at installation."""
|
|
194
194
|
|
|
195
195
|
model_config = ConfigDict(extra="forbid")
|
|
196
196
|
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"""Scheduling commands for the SDK-owned container gRPC contract."""
|
|
2
|
-
|
|
3
|
-
from typing import Annotated, ClassVar, Literal
|
|
4
|
-
|
|
5
|
-
from pydantic import Field, StrictStr, field_validator
|
|
6
|
-
|
|
7
|
-
from execution_plane_client.commands.base import CommandPayload
|
|
8
|
-
from execution_plane_client.protocol import PositiveInt, WireModel, validate_json
|
|
9
|
-
|
|
10
|
-
StepIdentity = Annotated[StrictStr, Field(min_length=1, max_length=256, pattern=r"^[A-Za-z0-9._:-]+$")]
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class WorkloadInvocation(WireModel):
|
|
14
|
-
"""Public invocation data; EP supplies the attempt ID and credential mounts.
|
|
15
|
-
|
|
16
|
-
Script environment variables remain ordinary step inputs. Credential-file
|
|
17
|
-
delivery is not implemented yet, so callers cannot supply secret values or
|
|
18
|
-
claim that arbitrary file paths have been mounted by EP.
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
workflow_run_id: StepIdentity
|
|
22
|
-
step_revision_id: StepIdentity
|
|
23
|
-
inputs: dict[str, object]
|
|
24
|
-
runtime_context: dict[str, object] = Field(default_factory=dict)
|
|
25
|
-
timeout_seconds: Annotated[PositiveInt, Field(le=86_400)]
|
|
26
|
-
|
|
27
|
-
@field_validator("inputs", "runtime_context", mode="before")
|
|
28
|
-
@classmethod
|
|
29
|
-
def check_json(cls, value: object) -> object:
|
|
30
|
-
"""Keep nested invocation data finite, portable, and bounded."""
|
|
31
|
-
return validate_json(value)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class WorkExecute(CommandPayload):
|
|
35
|
-
"""Schedule one workload implementing the SDK container service."""
|
|
36
|
-
|
|
37
|
-
command_type: ClassVar[str] = "work.execute"
|
|
38
|
-
|
|
39
|
-
image: Annotated[StrictStr, Field(min_length=1, max_length=2048)]
|
|
40
|
-
selectors: dict[StrictStr, StrictStr] = Field(default_factory=dict)
|
|
41
|
-
invocation: WorkloadInvocation = Field(repr=False)
|
|
42
|
-
output_config: dict[str, str] | None = None
|
|
43
|
-
workload_type: Literal["container"] = "container"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|