boatyard 0.9.2__tar.gz → 0.9.3.dev256__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.
Files changed (83) hide show
  1. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/AGENTS.md +3 -2
  2. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/PKG-INFO +1 -1
  3. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/pyproject.toml +1 -1
  4. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score.py +1 -1
  5. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_compose.py +6 -0
  6. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_k8s.py +2 -0
  7. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_score_generate.py +48 -2
  8. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.gitattributes +0 -0
  9. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.github/workflows/cleanup-pr-releases.yml +0 -0
  10. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.github/workflows/integrate.yml +0 -0
  11. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.github/workflows/merge-gate.yml +0 -0
  12. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.github/workflows/release.yml +0 -0
  13. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.gitignore +0 -0
  14. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.python-version +0 -0
  15. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/CLAUDE.md +0 -0
  16. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/LICENSE +0 -0
  17. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/NOTICE +0 -0
  18. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/README.md +0 -0
  19. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/design/AGENTS.md +0 -0
  20. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/design/CLAUDE.md +0 -0
  21. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/design/apt-hermeticity.md +0 -0
  22. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/design/mirror-digest-retention.md +0 -0
  23. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/design/precision-attribution.md +0 -0
  24. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/design/semver-image-bundle-lines.md +0 -0
  25. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/publish.yml +0 -0
  26. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/ruff.base.toml +0 -0
  27. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/ruff.toml +0 -0
  28. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/scripts/preflight.py +0 -0
  29. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/__init__.py +0 -0
  30. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/build.py +0 -0
  31. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/cli.py +0 -0
  32. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/crane.py +0 -0
  33. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/lock.py +0 -0
  34. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/markers.py +0 -0
  35. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/__init__.py +0 -0
  36. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/config_file.py +0 -0
  37. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/image.py +0 -0
  38. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/k8s_pins.py +0 -0
  39. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/lock_file.py +0 -0
  40. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/pyproject.py +0 -0
  41. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/values_file.py +0 -0
  42. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/workload.py +0 -0
  43. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/paths.py +0 -0
  44. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/publish.py +0 -0
  45. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/py.typed +0 -0
  46. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/resolve.py +0 -0
  47. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_generate.py +0 -0
  48. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_patch_templates/gpu-cuda.tpl +0 -0
  49. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_patch_templates/gpu-pod.tpl +0 -0
  50. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_patch_templates/gpu-rocm.tpl +0 -0
  51. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_patch_templates/probe-adapter-healthchecks.tpl +0 -0
  52. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_patch_templates/restart.tpl +0 -0
  53. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_patch_templates/scale-to-zero.tpl +0 -0
  54. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/temp.py +0 -0
  55. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/__init__.py +0 -0
  56. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/build.py +0 -0
  57. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/bump.py +0 -0
  58. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/down.py +0 -0
  59. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/lock.py +0 -0
  60. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/matrix.py +0 -0
  61. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/mirror.py +0 -0
  62. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/publish.py +0 -0
  63. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/score.py +0 -0
  64. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/tree_tags.py +0 -0
  65. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/up.py +0 -0
  66. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/yaml.py +0 -0
  67. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/conftest.py +0 -0
  68. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_assembly.py +0 -0
  69. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_build_docker.py +0 -0
  70. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_bump.py +0 -0
  71. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_compose.py +0 -0
  72. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_config.py +0 -0
  73. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_daemon_gc.py +0 -0
  74. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_image_builds.py +0 -0
  75. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_lock.py +0 -0
  76. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_markers.py +0 -0
  77. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_matrix.py +0 -0
  78. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_mirror.py +0 -0
  79. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_provisioners.py +0 -0
  80. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_publish_compose.py +0 -0
  81. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_tree_tags.py +0 -0
  82. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_values.py +0 -0
  83. {boatyard-0.9.2 → boatyard-0.9.3.dev256}/uv.lock +0 -0
@@ -47,8 +47,9 @@ Design intent and silent-failure traps, one fact per bullet.
47
47
  route records; nothing hand-copies an upstream.
48
48
  - The gateway table is compiler output: it orders by path specificity (longest concrete
49
49
  prefix first, the `/*` catch-all last), and each claiming workload exports
50
- `<WORKLOAD>_ROUTE_PATH` (the claim's concrete path) into the tool env provisioner
51
- templates read via `{{ env }}`.
50
+ `<WORKLOAD>_ROUTE_PATH` (the claim's concrete path) into every rendering's tool env —
51
+ assembly-wide, so a provisioner in one bundle templates a claim authored in another —
52
+ read via `{{ env }}`.
52
53
  - `$`-doubling: a literal `$` in file text placed inside a compose document (edge Caddyfile,
53
54
  file-sourced configs, score's bind inlining) is doubled via `double_dollars` in
54
55
  `models/config_file.py` — the one home. Text outside a compose document (k8s manifests) never
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: boatyard
3
- Version: 0.9.2
3
+ Version: 0.9.3.dev256
4
4
  Summary: Deploy-files definition language and compiler, plus a runtime for the compose target
5
5
  License-File: LICENSE
6
6
  License-File: NOTICE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boatyard"
3
- version = "0.9.2"
3
+ version = "0.9.3.dev256"
4
4
  description = "Deploy-files definition language and compiler, plus a runtime for the compose target"
5
5
  requires-python = ">=3.13"
6
6
  dependencies = [
@@ -91,6 +91,7 @@ def render_score(
91
91
  config: ConfigFile,
92
92
  substrate: Substrate,
93
93
  workloads: list[LoadedWorkload],
94
+ route_exports: dict[str, str],
94
95
  variable_values: dict[str, str],
95
96
  images: dict[str, str],
96
97
  templates: list[str],
@@ -107,7 +108,6 @@ def render_score(
107
108
  output.parent.mkdir(parents=True, exist_ok=True)
108
109
 
109
110
  # The lock images join as bindings underneath the caller's values
110
- route_exports = route_path_exports(workloads)
111
111
  collisions = sorted(set(route_exports) & ({*images, *variable_values}))
112
112
  if collisions:
113
113
  raise ValueError(f"the route path export {collisions[0]} collides with an authored rendering value")
@@ -32,6 +32,7 @@ from boatyard.yaml import Yaml, load_yaml_model
32
32
  from boatyard.score import (
33
33
  dump_yaml,
34
34
  render_score,
35
+ route_path_exports,
35
36
  write_file,
36
37
  )
37
38
 
@@ -148,6 +149,10 @@ def generate_compose(config: ConfigFile, lock: LockFile) -> list[Path]:
148
149
  require_compose_probe_adapters([
149
150
  config.workloads[workload_name] for workload_name in sorted(rendered_workload_names)
150
151
  ])
152
+ # Route path exports are assembly-wide facts, not per-entry: a provisioner in
153
+ # one bundle templates a claim authored in another (grafana's OAuth URLs spell
154
+ # keycloak's claim path), so every rendering's env carries every claim.
155
+ route_exports = route_path_exports(list(config.workloads.values()))
151
156
  outputs: list[Path] = []
152
157
  for name, entry in config.local_service_entries():
153
158
  workloads = [config.workloads[workload_name] for workload_name in entry.workloads]
@@ -162,6 +167,7 @@ def generate_compose(config: ConfigFile, lock: LockFile) -> list[Path]:
162
167
  config,
163
168
  substrate="compose",
164
169
  workloads=workloads,
170
+ route_exports=route_exports,
165
171
  variable_values={**sentinels, **entry.vars},
166
172
  templates=[
167
173
  HEALTHCHECK_TEMPLATE,
@@ -28,6 +28,7 @@ from boatyard.yaml import Yaml, is_list, is_mapping
28
28
  from boatyard.score import (
29
29
  dump_yaml,
30
30
  render_score,
31
+ route_path_exports,
31
32
  split_documents,
32
33
  write_file,
33
34
  )
@@ -84,6 +85,7 @@ def generate_k8s(
84
85
  config,
85
86
  substrate="k8s",
86
87
  workloads=workloads,
88
+ route_exports=route_path_exports(list(config.workloads.values())),
87
89
  variable_values={
88
90
  STORAGE_CLASS_VAR: LOCAL_STORAGE_CLASS if local else CLOUD_STORAGE_CLASS,
89
91
  **k8s.vars,
@@ -670,14 +670,17 @@ def test_generate_compose_barrier_names_are_one_global_slot(tmp_path: Path, monk
670
670
 
671
671
 
672
672
  class WorkloadContentsRecorder:
673
- def __init__(self, generated: str = API_SERVICE_RENDERING) -> None:
673
+ def __init__(self, generated: str = API_SERVICE_RENDERING, generated_by_name: dict[str, str] | None = None) -> None:
674
674
  self.generated = generated
675
+ self.generated_by_name = generated_by_name
675
676
  self.workload_contents: dict[str, str] = {}
676
677
  self.command_envs: dict[str, dict[str, str] | None] = {}
678
+ self.generate_envs: list[dict[str, str] | None] = []
677
679
 
678
680
  def run(self, command: str, *, cwd: Path | None = None, env: dict[str, str] | None = None) -> None:
679
681
  self.command_envs[command.split()[0] + " " + command.split()[1]] = env
680
682
  if command.startswith("score-compose generate"):
683
+ self.generate_envs.append(env)
681
684
  for argument in command.split()[2:]:
682
685
  if argument.startswith("--output"):
683
686
  break
@@ -685,7 +688,8 @@ class WorkloadContentsRecorder:
685
688
  self.workload_contents[path.name] = path.read_text(encoding="utf-8")
686
689
  output = Path(command.rsplit("--output ", 1)[1].split()[0])
687
690
  output.parent.mkdir(parents=True, exist_ok=True)
688
- output.write_text(self.generated, encoding="utf-8")
691
+ rendered = self.generated if self.generated_by_name is None else self.generated_by_name[output.name]
692
+ output.write_text(rendered, encoding="utf-8")
689
693
 
690
694
 
691
695
  LOCK_ANNOTATION_API = (
@@ -1185,6 +1189,48 @@ def test_the_route_path_export_rides_the_tool_environment(tmp_path: Path, monkey
1185
1189
  assert recorder.command_envs["score-compose init"] == generate_env
1186
1190
 
1187
1191
 
1192
+ def test_the_route_path_export_crosses_bundle_boundaries(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
1193
+ (tmp_path / "stack" / "score").mkdir(parents=True, exist_ok=True)
1194
+ (tmp_path / "stack" / "score" / "api.yaml").write_text(ROUTE_CLAIM_WORKLOAD, encoding="utf-8")
1195
+ (tmp_path / "stack" / "score" / "aux.yaml").write_text(
1196
+ "metadata:\n name: aux\n annotations:\n boatyard/lock: aux=AUX_IMAGE\ncontainers:\n aux: {}\n",
1197
+ encoding="utf-8",
1198
+ )
1199
+ recorder = WorkloadContentsRecorder(
1200
+ generated_by_name={
1201
+ "compose.core-main.yaml": ROUTE_CLAIM_GENERATED,
1202
+ "compose.auxiliary-other.yaml": "services:\n aux-aux:\n image: ghcr.io/org/aux:1\n",
1203
+ }
1204
+ )
1205
+ monkeypatch.setattr(score_module, "bash", recorder.run)
1206
+ config = _generated_config(
1207
+ tmp_path,
1208
+ ["api.yaml", "aux.yaml"],
1209
+ repository="ghcr.io/org/repo",
1210
+ project_name="example",
1211
+ platforms=["linux/amd64"],
1212
+ services={
1213
+ "core": {"options": {"main": {"workloads": ["api.yaml"]}}},
1214
+ "auxiliary": {"options": {"other": {"workloads": ["aux.yaml"]}}},
1215
+ },
1216
+ )
1217
+ score_compose_module.generate_compose(
1218
+ config,
1219
+ _lock_for_images({
1220
+ "API_IMAGE": "ghcr.io/org/api:1@" + DIGEST,
1221
+ "AUX_IMAGE": "ghcr.io/org/aux:1@" + DIGEST,
1222
+ **ALPINE_LOCK,
1223
+ }),
1224
+ )
1225
+
1226
+ # A provisioner in one bundle templates a claim authored in another, so every
1227
+ # entry's generate env carries the export, not just the claiming entry's
1228
+ assert len(recorder.generate_envs) == 2
1229
+ for generate_env in recorder.generate_envs:
1230
+ assert generate_env is not None
1231
+ assert generate_env["API_ROUTE_PATH"] == "/auth"
1232
+
1233
+
1188
1234
  def test_two_claiming_workloads_spelling_one_export_refuse(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
1189
1235
  (tmp_path / "stack" / "score").mkdir(parents=True)
1190
1236
  for name in ("api", "API"):
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