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.
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/AGENTS.md +3 -2
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/PKG-INFO +1 -1
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/pyproject.toml +1 -1
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score.py +1 -1
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_compose.py +6 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_k8s.py +2 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_score_generate.py +48 -2
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.gitattributes +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.github/workflows/cleanup-pr-releases.yml +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.github/workflows/integrate.yml +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.github/workflows/merge-gate.yml +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.github/workflows/release.yml +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.gitignore +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/.python-version +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/CLAUDE.md +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/LICENSE +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/NOTICE +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/README.md +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/design/AGENTS.md +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/design/CLAUDE.md +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/design/apt-hermeticity.md +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/design/mirror-digest-retention.md +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/design/precision-attribution.md +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/design/semver-image-bundle-lines.md +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/publish.yml +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/ruff.base.toml +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/ruff.toml +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/scripts/preflight.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/__init__.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/build.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/cli.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/crane.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/lock.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/markers.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/__init__.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/config_file.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/image.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/k8s_pins.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/lock_file.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/pyproject.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/values_file.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/models/workload.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/paths.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/publish.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/py.typed +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/resolve.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_generate.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_patch_templates/gpu-cuda.tpl +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_patch_templates/gpu-pod.tpl +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_patch_templates/gpu-rocm.tpl +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_patch_templates/probe-adapter-healthchecks.tpl +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_patch_templates/restart.tpl +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_patch_templates/scale-to-zero.tpl +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/temp.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/__init__.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/build.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/bump.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/down.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/lock.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/matrix.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/mirror.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/publish.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/score.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/tree_tags.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/verbs/up.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/yaml.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/conftest.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_assembly.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_build_docker.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_bump.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_compose.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_config.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_daemon_gc.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_image_builds.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_lock.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_markers.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_matrix.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_mirror.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_provisioners.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_publish_compose.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_tree_tags.py +0 -0
- {boatyard-0.9.2 → boatyard-0.9.3.dev256}/tests/test_values.py +0 -0
- {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
|
|
51
|
-
templates
|
|
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
|
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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
|
{boatyard-0.9.2 → boatyard-0.9.3.dev256}/src/boatyard/score_patch_templates/scale-to-zero.tpl
RENAMED
|
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
|
|
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
|