dirigent-block-execute 0.17.3__tar.gz → 0.18.0__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.
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/PKG-INFO +4 -4
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/pyproject.toml +4 -4
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/pyproject.toml.orig +4 -4
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/compose.py +5 -8
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/docker.py +19 -4
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/messages.py +1 -1
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/shell.py +1 -0
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/LICENSE +0 -0
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/README.md +0 -0
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/__init__.py +0 -0
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/build.py +0 -0
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/capture.py +0 -0
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/environment.py +0 -0
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/git.py +0 -0
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/py.typed +0 -0
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/reap.py +0 -0
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/secrets.py +0 -0
- {dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/subprocess.py +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dirigent-block-execute
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.18.0
|
|
4
4
|
Summary: The execute block family for dirigent: shell, docker, compose, buildx, and a checkout.
|
|
5
5
|
License-Expression: LicenseRef-Proprietary
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
8
|
Classifier: Programming Language :: Python :: 3.13
|
|
9
|
-
Requires-Dist: dirigent-block-http==0.
|
|
10
|
-
Requires-Dist: dirigent-common==0.
|
|
11
|
-
Requires-Dist: dirigent-plugin==0.
|
|
9
|
+
Requires-Dist: dirigent-block-http==0.18.0
|
|
10
|
+
Requires-Dist: dirigent-common==0.18.0
|
|
11
|
+
Requires-Dist: dirigent-plugin==0.18.0
|
|
12
12
|
Requires-Dist: httpx2>=2.12.0
|
|
13
13
|
Requires-Python: >=3.13
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dirigent-block-execute"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.18.0"
|
|
4
4
|
description = "The execute block family for dirigent: shell, docker, compose, buildx, and a checkout."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.13"
|
|
@@ -11,9 +11,9 @@ classifiers = [
|
|
|
11
11
|
"Programming Language :: Python :: 3.13",
|
|
12
12
|
]
|
|
13
13
|
dependencies = [
|
|
14
|
-
"dirigent-block-http==0.
|
|
15
|
-
"dirigent-common==0.
|
|
16
|
-
"dirigent-plugin==0.
|
|
14
|
+
"dirigent-block-http==0.18.0",
|
|
15
|
+
"dirigent-common==0.18.0",
|
|
16
|
+
"dirigent-plugin==0.18.0",
|
|
17
17
|
"httpx2>=2.12.0",
|
|
18
18
|
]
|
|
19
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dirigent-block-execute"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.18.0"
|
|
4
4
|
description = "The execute block family for dirigent: shell, docker, compose, buildx, and a checkout."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.13"
|
|
@@ -11,9 +11,9 @@ classifiers = [
|
|
|
11
11
|
"Programming Language :: Python :: 3.13",
|
|
12
12
|
]
|
|
13
13
|
dependencies = [
|
|
14
|
-
"dirigent-block-http==0.
|
|
15
|
-
"dirigent-common==0.
|
|
16
|
-
"dirigent-plugin==0.
|
|
14
|
+
"dirigent-block-http==0.18.0",
|
|
15
|
+
"dirigent-common==0.18.0",
|
|
16
|
+
"dirigent-plugin==0.18.0",
|
|
17
17
|
"httpx2>=2.12.0",
|
|
18
18
|
]
|
|
19
19
|
|
|
@@ -141,10 +141,9 @@ class DockerComposeUpConfig(BlockModel):
|
|
|
141
141
|
pipeline document itself."""
|
|
142
142
|
|
|
143
143
|
project_name: str | None = None
|
|
144
|
-
"""The compose project (``-p``). Defaults to a deterministic name derived from the run id,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
and two runs never collide."""
|
|
144
|
+
"""The compose project (``-p``). Defaults to a deterministic name derived from the run id, so
|
|
145
|
+
this ``up``, the steps that drive it, and a later ``down`` all address the same project, and
|
|
146
|
+
two runs never collide."""
|
|
148
147
|
|
|
149
148
|
profiles: list[str] = Field(default_factory=list[str])
|
|
150
149
|
"""Compose profiles to activate (``--profile``)."""
|
|
@@ -213,13 +212,11 @@ class DockerComposeDownConfig(BlockModel):
|
|
|
213
212
|
|
|
214
213
|
project_name: str | None = None
|
|
215
214
|
"""The compose project (``-p``). Defaults to the same deterministic name ``up`` derives from
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
no wiring from the author."""
|
|
215
|
+
the run id, so a teardown step in the same run addresses the stack the ``up`` created with no
|
|
216
|
+
wiring from the author."""
|
|
219
217
|
|
|
220
218
|
file: str | None = None
|
|
221
219
|
"""A compose file, only if the CLI needs ``-f`` to resolve the project; a project tears down
|
|
222
|
-
|
|
223
220
|
by its label alone otherwise. As a path inside the run's work directory."""
|
|
224
221
|
|
|
225
222
|
content: str | None = None
|
{dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/docker.py
RENAMED
|
@@ -109,8 +109,8 @@ NOT_FOUND = 404
|
|
|
109
109
|
CONFLICT = 409
|
|
110
110
|
|
|
111
111
|
|
|
112
|
-
#: The schemes a daemon URL may be written in, which are the ones the
|
|
113
|
-
DAEMON_SCHEMES = ("tcp://", "
|
|
112
|
+
#: The schemes a daemon URL may be written in, which are the ones the worker speaks.
|
|
113
|
+
DAEMON_SCHEMES = ("tcp://", "unix://")
|
|
114
114
|
|
|
115
115
|
#: What a registry credential that names no registry authenticates to.
|
|
116
116
|
DOCKER_HUB = "docker.io"
|
|
@@ -123,7 +123,7 @@ class DockerConnectionConfig(BlockModel):
|
|
|
123
123
|
"""A daemon to reach, a registry to authenticate to, or both."""
|
|
124
124
|
|
|
125
125
|
host: str = ""
|
|
126
|
-
"""The daemon, as ``tcp://host:2376
|
|
126
|
+
"""The daemon, as ``tcp://host:2376`` or ``unix:///var/run/docker.sock``.
|
|
127
127
|
|
|
128
128
|
Left empty, a step using this connection reaches the daemon the worker's own environment
|
|
129
129
|
names, which is what a step naming no connection does."""
|
|
@@ -157,7 +157,7 @@ class DockerConnectionConfig(BlockModel):
|
|
|
157
157
|
def _check_shape(self) -> "DockerConnectionConfig":
|
|
158
158
|
"""Refuse a daemon URL of an unknown form, half a TLS triple, and half a credential."""
|
|
159
159
|
if self.host and not self.host.startswith(DAEMON_SCHEMES):
|
|
160
|
-
raise ValueError(NOT_A_DAEMON_SCHEME.render(schemes="
|
|
160
|
+
raise ValueError(NOT_A_DAEMON_SCHEME.render(schemes=" or ".join(DAEMON_SCHEMES), host=repr(self.host)))
|
|
161
161
|
pems = [self.tls_ca, self.tls_cert, self.tls_key]
|
|
162
162
|
if any(pem is not None for pem in pems) and not all(pem is not None for pem in pems):
|
|
163
163
|
raise ValueError(TLS_IS_ALL_THREE.render())
|
|
@@ -493,6 +493,7 @@ class DockerRunOutput(BlockModel):
|
|
|
493
493
|
"""What the container did, with its full streams and produced files addressable as artifacts."""
|
|
494
494
|
|
|
495
495
|
exit_code: int
|
|
496
|
+
"""The status the container exited with."""
|
|
496
497
|
|
|
497
498
|
stdout: str
|
|
498
499
|
"""The head of what the container printed, cut at the instance's inline capture size.
|
|
@@ -521,7 +522,11 @@ class DockerRunOutput(BlockModel):
|
|
|
521
522
|
"""Whether ``stderr`` above is short of the stream, which is an independent question."""
|
|
522
523
|
|
|
523
524
|
container_id: str
|
|
525
|
+
"""The container that ran, by the id the daemon gave it."""
|
|
526
|
+
|
|
524
527
|
image: str
|
|
528
|
+
"""The image the container ran."""
|
|
529
|
+
|
|
525
530
|
outputs: dict[str, str] = Field(default_factory=dict[str, str])
|
|
526
531
|
"""Where each declared output was written, by the name the config gave it: the storage URI,
|
|
527
532
|
or the path relative to the run's work directory it landed at."""
|
|
@@ -1148,6 +1153,9 @@ def resolve_endpoint(explicit_socket: str | None, environ: Mapping[str, str] | N
|
|
|
1148
1153
|
pipeline's containers off the host. ``DOCKER_TLS_VERIFY`` with ``DOCKER_CERT_PATH`` turns
|
|
1149
1154
|
that into https with client certificates, the way the docker CLI reads the same variables.
|
|
1150
1155
|
|
|
1156
|
+
A ``DOCKER_HOST`` in any other scheme is refused instead of resolving to the local socket:
|
|
1157
|
+
the daemon is reached over HTTP here, and nothing tunnels an ``ssh://`` one.
|
|
1158
|
+
|
|
1151
1159
|
``environ`` is what a step with a ``docker`` connection reads instead of the worker's own.
|
|
1152
1160
|
"""
|
|
1153
1161
|
source = os.environ if environ is None else environ
|
|
@@ -1168,6 +1176,13 @@ def resolve_endpoint(explicit_socket: str | None, environ: Mapping[str, str] | N
|
|
|
1168
1176
|
if host.startswith("unix://"):
|
|
1169
1177
|
socket = host.removeprefix("unix://") or DEFAULT_SOCKET_PATH
|
|
1170
1178
|
return DaemonEndpoint(DAEMON_BASE_URL, socket, True, None, socket)
|
|
1179
|
+
if host:
|
|
1180
|
+
raise BlockFailure(
|
|
1181
|
+
NOT_A_DAEMON_SCHEME,
|
|
1182
|
+
error_class=ErrorClass.REJECTED,
|
|
1183
|
+
schemes=" or ".join(DAEMON_SCHEMES),
|
|
1184
|
+
host=repr(host),
|
|
1185
|
+
)
|
|
1171
1186
|
return DaemonEndpoint(DAEMON_BASE_URL, DEFAULT_SOCKET_PATH, True, None, DEFAULT_SOCKET_PATH)
|
|
1172
1187
|
|
|
1173
1188
|
|
|
@@ -125,7 +125,7 @@ CWD_STAYS_INSIDE = EXECUTE.define(
|
|
|
125
125
|
|
|
126
126
|
NOT_A_DAEMON_SCHEME = EXECUTE.define(
|
|
127
127
|
"not_a_daemon_scheme",
|
|
128
|
-
"a docker host is
|
|
128
|
+
"a docker host is {schemes}, and {host} is not one of them",
|
|
129
129
|
)
|
|
130
130
|
|
|
131
131
|
TLS_IS_ALL_THREE = EXECUTE.define(
|
{dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/shell.py
RENAMED
|
@@ -77,6 +77,7 @@ class ShellRunOutput(BlockModel):
|
|
|
77
77
|
"""What the command did, with its full streams addressable as artifacts."""
|
|
78
78
|
|
|
79
79
|
exit_code: int
|
|
80
|
+
"""The status the command exited with."""
|
|
80
81
|
|
|
81
82
|
stdout: str
|
|
82
83
|
"""The head of what the command printed, cut at the instance's inline capture size.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/build.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/git.py
RENAMED
|
File without changes
|
{dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/py.typed
RENAMED
|
File without changes
|
{dirigent_block_execute-0.17.3 → dirigent_block_execute-0.18.0}/src/dirigent_block_execute/reap.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|