Skip to content

Commit f70f2b9

Browse files
committed
ci: carry the 95m ingress body cap in the N0 release template
Raise CLIENT_MAX_BODY_SIZE 32m -> 95m in the root compose (#309's approved ca110b0b… becomes b0cd8248…, 2 bytes) and lock the release template over those bytes: 92641ed5…. #309's approved pre-cap bytes no longer satisfy the template. Pre-N0 template and captured rollback artifacts are unchanged. Refs TC-959, TC-1012
1 parent 1b7c0dd commit f70f2b9

6 files changed

Lines changed: 25 additions & 18 deletions

File tree

‎.github/workflows/docker.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,9 @@ jobs:
663663
raise SystemExit('::error::Deployment destination is not the fixed reviewed path')
664664
native = 'ghcr.io/tinycloudlabs/tinycloud-node'
665665
reviewed = native + '@sha256:4bdae4fc232d886bb56bfbce4ec62ed4b8fb4e1369a01f6afb73d06dd68c188f'
666-
# TC-959: #309's reviewed N0 compose (raw ca110b0b… with the 1.20.6
667-
# pin) with its single node digest normalized to 64 zeros.
668-
n0_template_hash = '92be17ff125e5d4cada9b81d7a8e655442fa66a454e19f76e3f8880a93123d3d'
666+
# TC-959: main's N0 compose (#349 c33c2302…) with the 95m ingress body
667+
# cap (raw d95bfb70…), its single node digest normalized to 64 zeros.
668+
n0_template_hash = '51f8e9e93edc0e16025d27ee42abe003ed5d1cf26ba8f437d5120894aca64bdb'
669669
node_pin = re.compile(rb'(?m)^ image: ghcr\.io/tinycloudlabs/tinycloud-node@sha256:([0-9a-f]{64})$')
670670
def n0_template(raw):
671671
pins = list(node_pin.finditer(raw))

‎docker-compose.dstack-postgres.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ services:
111111
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
112112
- SET_CAA=true
113113
- DNS_PROVIDER=cloudflare
114-
- CLIENT_MAX_BODY_SIZE=32m
114+
- CLIENT_MAX_BODY_SIZE=95m
115115
volumes:
116116
- /var/run/dstack.sock:/var/run/dstack.sock
117117
- cert-data:/etc/letsencrypt

‎docs/releasing.md‎

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ inside `deploy-phala`). Other refs fail `Deploy refused (main-only)`.
6767

6868
**Release order:** approved #310 must never merge alone. Land #310 and its
6969
stacked recovery changes atomically as one lineage, preserving emergency
70-
re-promotion and security rollback first. #309's sidecar compose may then
71-
ship in the same window as a main release, promoted by one dispatch (see
70+
re-promotion and security rollback first. #309's sidecar compose then ships
71+
on the unchanged 1.20.6 image under that lineage's exact raw-hash lock. The
72+
later main release lands this template lock and the 95m ingress body cap,
73+
and is promoted by one dispatch (see
7274
[Main release with N0 log shipping](#main-release-with-n0-log-shipping-one-dispatch)).
7375
These docs grant no merge or dispatch authority. Merging either workflow
7476
change is a push, not a deployment dispatch.
@@ -270,9 +272,10 @@ its branch policy before any workflow that names it runs.
270272
271273
### Main release with N0 log shipping (one dispatch)
272274
273-
Ships a main release and #309's log sidecar together. Before dispatching,
274-
`main` must contain the combined workflow lineage and #309, plus the merged
275-
`chore(release): 1.21.0` commit tagged `v1.21.0`. Take the digest and
275+
Ships a main release on #309's log sidecar compose. Before dispatching,
276+
`main` must contain the combined workflow lineage, #309, the template-lock
277+
change that also raises the ingress `CLIENT_MAX_BODY_SIZE` to `95m`, and the
278+
merged `chore(release): 1.21.0` commit tagged `v1.21.0`. Take the digest and
276279
labels of the tag build's `1.21.0-dstack` image as in step 1 above:
277280
278281
```sh
@@ -290,9 +293,12 @@ Before any CVM mutation the workflow requires:
290293
291294
- the main compose, with its one node digest replaced by 64 zeros, to hash
292295
to the reviewed N0 template
293-
**`92be17ff125e5d4cada9b81d7a8e655442fa66a454e19f76e3f8880a93123d3d`**
294-
(#309's raw `ca110b0bae6d5a06a1002fb80df3f71cffec11659c9f9dbfa5d72624735546f6`
295-
normalized). Ingress, socat, Vector and the log profile stay byte-exact;
296+
**`51f8e9e93edc0e16025d27ee42abe003ed5d1cf26ba8f437d5120894aca64bdb`**
297+
(raw `d95bfb707871c1d626c4a8f2b8d32d354103edbb5077847c6a21fe5f7f6cfa50` normalized: the #349 compose
298+
`c33c23021589163b62a71ef245b7194717711922027629f155bdd5cff806b8c7`, which
299+
keeps `TINYCLOUD_EPOCH_HEAD_BACKFILL__ENABLED: "false"` and #346's Vector
300+
config, with only `CLIENT_MAX_BODY_SIZE=32m` → `95m`). Ingress, socat,
301+
Vector and the log profile stay byte-exact;
296302
- the deployed compose to differ from that template only by
297303
`deploy_image_digest`;
298304
- OCI labels `1.21.0-dstack` / `<release-commit-sha>`, the `v1.21.0` tag on
@@ -345,11 +351,10 @@ gh workflow run docker.yml -R TinyCloudLabs/tinycloud-node --ref main \
345351
```
346352

347353
The served/OCI identity remains **1.20.6-dstack / e18578ff9162986ddd813259c60f73866e3e60d1**.
348-
With #309 on main this redeploys exactly #309's reviewed raw compose
349-
`ca110b0bae6d5a06a1002fb80df3f71cffec11659c9f9dbfa5d72624735546f6`
350-
(from reviewed head `44eeb20a1461ef66b5af492e3be4c42be2728b67`,
351-
[approval](https://github.com/TinyCloudLabs/tinycloud-node/pull/309#issuecomment-6224650050)),
352-
whatever digest main's template currently pins. It is not a rollback of a
354+
With the template lock on main this redeploys exactly main's raw compose
355+
`d95bfb707871c1d626c4a8f2b8d32d354103edbb5077847c6a21fe5f7f6cfa50`
356+
(the #349 compose `c33c2302…` plus the 95m ingress body cap), whatever digest
357+
main's template currently pins. It is not a rollback of a
353358
later release across a schema migration. Current pre-N0 tag/pinned
354359
equivalents are separately hash-checked; arbitrary same-image config
355360
substitutions fail before mutation.

‎docs/runbooks/tc-959-n0-log-shipping.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ Keep these identities distinct:
147147
| Before: verifier `docker_compose_file` / hash | Raw preserved pre-N0 compose: `df239749ca0a9c09893a855ae2a8abb94090b8556515ad002105c58ac91f4c91` |
148148
| Before: application `compose_hash` | `bfe9028a58b23238188aa7d70b82282a7cd6414cd83dcc47a3b295c6f64fe2f8`; a distinct reported identity, not the raw-file hash |
149149
| After: current profile-enabled raw compose | `c33c23021589163b62a71ef245b7194717711922027629f155bdd5cff806b8c7`; bind this artifact to the final reviewed PR head before any promotion |
150+
| After the main release: template-locked raw compose | `d95bfb707871c1d626c4a8f2b8d32d354103edbb5077847c6a21fe5f7f6cfa50` (main's compose with only `CLIENT_MAX_BODY_SIZE=32m` → `95m`); node digest normalized, template `51f8e9e93edc0e16025d27ee42abe003ed5d1cf26ba8f437d5120894aca64bdb`. See [`docs/releasing.md`](../releasing.md#main-release-with-n0-log-shipping-one-dispatch) |
150151

151152
The raw after hash identifies the profile-enabled compose, not deployment approval. Record its final reviewed PR head and required CI evidence in the officer handoff. Do not infer a raw-file hash from the distinct application-reported compose hash.
152153

‎scripts/ci/fixtures/tc959-n0-compose.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ services:
111111
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
112112
- SET_CAA=true
113113
- DNS_PROVIDER=cloudflare
114-
- CLIENT_MAX_BODY_SIZE=32m
114+
- CLIENT_MAX_BODY_SIZE=95m
115115
volumes:
116116
- /var/run/dstack.sock:/var/run/dstack.sock
117117
- cert-data:/etc/letsencrypt

‎scripts/ci/test-deploy-recovery.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ def test_n0_template_drift_refuses_release_digest(self):
330330
node_line = b" image: ghcr.io/tinycloudlabs/tinycloud-node@" + DIGEST.encode() + b"\n"
331331
for name, compose in (("profile", N0.replace(b":-errors_slow}", b":-all_requests}")),
332332
("ingress", N0.replace(b"63c1c44e2ded5b73a5f174807b91ca677826974df0f9ab3045f6ec87865a5744", b"e" * 64)),
333+
("approved pre-cap bytes", N0.replace(b"CLIENT_MAX_BODY_SIZE=95m", b"CLIENT_MAX_BODY_SIZE=32m")),
333334
("crlf", N0.replace(b"\n", b"\r\n")),
334335
("duplicate node", N0.replace(node_line, node_line * 2)),
335336
("quoted node", N0.replace(b"@" + DIGEST.encode(), b"@" + DIGEST.encode() + b"'").replace(

0 commit comments

Comments
 (0)