interloper-docker 0.131.0__tar.gz → 0.133.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.
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: interloper-docker
3
- Version: 0.131.0
3
+ Version: 0.133.0
4
4
  Summary: Interloper Docker integration
5
5
  Author: Guillaume Onfroy
6
6
  Author-email: Guillaume Onfroy <guillaume@digitlcloud.com>
7
7
  Requires-Dist: docker>=7.1.0
8
8
  Requires-Dist: interloper-core
9
9
  Requires-Dist: interloper-scheduler
10
- Requires-Python: >=3.10
10
+ Requires-Python: >=3.11
11
11
  Description-Content-Type: text/markdown
12
12
 
@@ -1,9 +1,9 @@
1
1
  [project]
2
2
  name = "interloper-docker"
3
- version = "0.131.0"
3
+ version = "0.133.0"
4
4
  description = "Interloper Docker integration"
5
5
  readme = "README.md"
6
- requires-python = ">=3.10"
6
+ requires-python = ">=3.11"
7
7
  dependencies = [
8
8
  "docker>=7.1.0",
9
9
  "interloper-core",
@@ -14,14 +14,11 @@ dependencies = [
14
14
  name = "Guillaume Onfroy"
15
15
  email = "guillaume@digitlcloud.com"
16
16
 
17
- [project.entry-points."interloper.runners"]
18
- docker = "interloper_docker.runner:DockerRunner"
19
-
20
- [project.entry-points."interloper.launchers"]
21
- docker = "interloper_docker.launcher:DockerLauncher"
17
+ [project.entry-points."interloper.extensions"]
18
+ docker = "interloper_docker"
22
19
 
23
20
  [build-system]
24
- requires = ["uv_build>=0.12.9,<0.13"]
21
+ requires = ["uv_build>=0.13.7,<0.14"]
25
22
  build-backend = "uv_build"
26
23
 
27
24
  [tool.uv.sources.interloper-core]
@@ -3,21 +3,18 @@
3
3
  # ###############
4
4
  [project]
5
5
  name = "interloper-docker"
6
- version = "0.131.0"
6
+ version = "0.133.0"
7
7
  description = "Interloper Docker integration"
8
8
  readme = "README.md"
9
9
  authors = [{ name = "Guillaume Onfroy", email = "guillaume@digitlcloud.com" }]
10
- requires-python = ">=3.10"
10
+ requires-python = ">=3.11"
11
11
  dependencies = ["docker>=7.1.0", "interloper-core", "interloper-scheduler"]
12
12
 
13
- [project.entry-points."interloper.runners"]
14
- docker = "interloper_docker.runner:DockerRunner"
15
-
16
- [project.entry-points."interloper.launchers"]
17
- docker = "interloper_docker.launcher:DockerLauncher"
13
+ [project.entry-points."interloper.extensions"]
14
+ docker = "interloper_docker"
18
15
 
19
16
  [build-system]
20
- requires = ["uv_build>=0.12.9,<0.13"]
17
+ requires = ["uv_build>=0.13.7,<0.14"]
21
18
  build-backend = "uv_build"
22
19
 
23
20
  [tool.uv.sources]
@@ -0,0 +1,8 @@
1
+ manifest_version: 1
2
+ key: docker
3
+ name: Docker
4
+ description: "Runs and operations in Docker containers."
5
+ runners:
6
+ docker: interloper_docker.runner:DockerRunner
7
+ launchers:
8
+ docker: interloper_docker.launcher:DockerLauncher
@@ -14,8 +14,10 @@ from interloper.errors import ConfigError
14
14
  from interloper.telemetry.propagation import child_process_env
15
15
 
16
16
  if TYPE_CHECKING:
17
- from interloper.settings import LauncherSettings, ReaperSettings, RunnerSettings, ServerSettings
17
+ from interloper.settings import RunnerSettings, ServerSettings
18
+ from interloper_db import Store
18
19
  from interloper_db.models import Run
20
+ from interloper_scheduler.settings import LauncherSettings, ReaperSettings
19
21
  from interloper_scheduler.launcher import Launcher
20
22
 
21
23
  logger = logging.getLogger(__name__)
@@ -38,7 +40,7 @@ class DockerLauncher(Launcher):
38
40
  runner: RunnerSettings,
39
41
  reaper: ReaperSettings,
40
42
  catalog: Catalog | None,
41
- store: Any | None = None,
43
+ store: Store | None = None,
42
44
  ) -> DockerLauncher:
43
45
  """Construct from scheduler settings (registry construction hook).
44
46
 
@@ -188,11 +190,11 @@ class DockerLauncher(Launcher):
188
190
  The environment the run container is started with.
189
191
  """
190
192
  environment: dict[str, str] = {
191
- "INTERLOPER_CATALOG": json.dumps(self._catalog.to_paths()),
193
+ "INTERLOPER_CATALOG_INCLUDE": ",".join(self._catalog.to_paths()),
192
194
  "INTERLOPER_RUNNER_TYPE": self._runner_type,
193
195
  "INTERLOPER_RUNNER_CONFIG": json.dumps(self._runner_config),
194
- "INTERLOPER_REAPER_HEARTBEAT_INTERVAL": str(self._heartbeat_interval),
195
- "INTERLOPER_REAPER_HEARTBEAT_TIMEOUT": str(self._heartbeat_timeout),
196
+ "INTERLOPER_RUN_HEARTBEAT_INTERVAL": str(self._heartbeat_interval),
197
+ "INTERLOPER_RUN_HEARTBEAT_TIMEOUT": str(self._heartbeat_timeout),
196
198
  "INTERLOPER_SERVER_INTERNAL_URL": self._internal_url,
197
199
  "INTERLOPER_RUN_TOKEN": token,
198
200
  }
@@ -30,7 +30,7 @@ from docker.models.containers import Container
30
30
  from interloper.errors import RunnerError, format_exception
31
31
  from interloper.operation import Operation, OperationResult
32
32
  from interloper.runner import Run, Runner
33
- from interloper.settings import AppSettings
33
+ from interloper.settings import RunSettings, ServerSettings
34
34
  from interloper.telemetry.propagation import child_process_env
35
35
  from pydantic import Field
36
36
 
@@ -175,7 +175,7 @@ class DockerRun(Run):
175
175
  Returns:
176
176
  The argv.
177
177
  """
178
- if AppSettings.get().run.token:
178
+ if RunSettings.get().token:
179
179
  return ["interloper", "launch", self.run_id, f"--operation-id={operation.id}"]
180
180
  spec = self.dag.mini_dag(operation.id).to_spec().model_dump(mode="json")
181
181
  command = ["interloper", "run", "--format", "inline", json.dumps(spec), f"--operation-id={operation.id}"]
@@ -240,15 +240,17 @@ class DockerRunner(Runner):
240
240
 
241
241
  Returns:
242
242
  ``env_vars``, the trace context the child continues and, on the
243
- platform, the host run's token and the API's URL, with which the
244
- child loads the run and reports to it.
243
+ platform, the host run's token, heartbeat cadence and the API's
244
+ URL, with which the child loads the run and reports to it.
245
245
  """
246
246
  environment = dict(self.env_vars)
247
247
  environment.update(child_process_env())
248
- settings = AppSettings.get()
249
- if settings.run.token:
250
- environment["INTERLOPER_RUN_TOKEN"] = settings.run.token
251
- environment["INTERLOPER_SERVER_INTERNAL_URL"] = settings.server.internal_url
248
+ run = RunSettings.get()
249
+ if run.token:
250
+ environment["INTERLOPER_RUN_TOKEN"] = run.token
251
+ environment["INTERLOPER_RUN_HEARTBEAT_INTERVAL"] = str(run.heartbeat_interval)
252
+ environment["INTERLOPER_RUN_HEARTBEAT_TIMEOUT"] = str(run.heartbeat_timeout)
253
+ environment["INTERLOPER_SERVER_INTERNAL_URL"] = ServerSettings.get().internal_url
252
254
  return environment
253
255
 
254
256
  def mounts(self) -> dict[str, dict[str, str]]: