Repository navigation
ci: promote a released main image with the reviewed N0 compose template - #315
Conversation
ea5d7c0 to
970a34f
Compare
Same bytes (sha256 28302d67...) as the frozen copy, without adding a fixture file; matches the derivation used by #315.
* test(TC-959): use pre-N0 template fixture in recovery tests Future-digest and normal-build recovery cases ran against the repository's current compose. Since #309 that file is the reviewed N0 compose, which the workflow intentionally refuses to pair with any image other than the reviewed 1.20.6 digest. Run these cases against a frozen copy of the pre-N0 template (sha256 28302d67...) instead, and assert the N0 compose refuses a normal build image as it already refuses a future digest. * test(TC-959): derive pre-N0 template from the rollback artifact Same bytes (sha256 28302d67...) as the frozen copy, without adding a fixture file; matches the derivation used by #315.
Lock #309's compose as a template (raw bytes with the single node digest normalized) so the main release and the sidecar ship in one dispatch. Only a recorded released image (labels, vX.Y.Z tag and crate version agree) may fill the pin; same-image recovery and the captured pre-N0 rollback are unchanged. Refs TC-959
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
970a34f to
f70f2b9
Compare
|
REQUEST_CHANGES: see TC-1176 (reviewed exact head f70f2b9) Head f70f2b9 / base 97a2136 verified. CI is terminal and green: 24 check runs, all success or skipped. Local Blocker: Verified OK:
Non-blocking:
|
…e recovery The promoted revision must strictly descend from the running production revision; 12c same-image recovery refuses an image older than running. The captured pre-N0 rollback stays the intentional downgrade route. Refs TC-959
* TC-1012 cap /invoke upload bodies at 95 MiB with 413 * TC-1012 CHANGELOG: release compose line rides with #315
|
APPROVE: see TC-1176 (reviewed exact head 62e07e8) |
Tracking: TC-959 (https://linear.app/tinycloud-labs/issue/TC-959), TC-1012 (body cap)
Scope and merge order
Rebased onto main
97a2136e(includes #313, #309, #346, #349, #343, #318). Two commits: release-image template lock and the 95m body cap with template rebind. Re-pushing invalidates any earlier approval, so exact-head review is needed. No merge or deployment authorization is requested here.This PR's own changes:
.github/workflows/docker.yml(theValidate and pin deployment imagestep),scripts/ci/test-deploy-recovery.py,scripts/ci/fixtures/tc959-n0-compose.yaml,docs/releasing.md, a single row indocs/runbooks/tc-959-n0-log-shipping.md, and one line ofdocker-compose.dstack-postgres.yaml:CLIENT_MAX_BODY_SIZE=32m→95m. That turns #309's approved raw main's #349 composec33c23021589163b62a71ef245b7194717711922027629f155bdd5cff806b8c7intod95bfb707871c1d626c4a8f2b8d32d354103edbb5077847c6a21fe5f7f6cfa50(2 bytes, offsets 5454–5455). No app/Rust changes. Node and ingress-image body-limit changes are in TC-1012's separate PR.Change
#313 locks the N0 compose to its raw bytes, so it can only deploy the 1.20.6 image. This PR locks it as a template instead: the final compose bytes with the one node digest normalized to 64 zeros, SHA256
51f8e9e93edc0e16025d27ee42abe003ed5d1cf26ba8f437d5120894aca64bdb. Thesedcommand to reproduce it is in docs/releasing.md.deploy_image_digest. Labels must beX.Y.Z-dstack/ R, the recorded inputs must equal those labels, tagvX.Y.Zmust point at R,Cargo.tomlat R must reportX.Y.Z, and R must be in main history (existing guard). An untagged, mislabelled, feature-variant or freshly built image is refused before mutation.ca110b0b…) no longer satisfy the template.28302d67…/df239749…); captured pre-N0 rollback (df239749…plus the explicit privacy mode, still 32m); the forward non-N0 route; sealed preflight; token sealing with theallowed_envssync; general quota reconciliation; dispatch-only and main-only guards.This also fixes main's current version-guard failures: on main
199a9e3bthe recovery suite fails 2/17 (test_future_digest_…,test_normal_build_deployment_…), because those tests deploy main's root compose, which is now N0, with a non-1.20.6 image. They now use an explicit pre-N0 template fixture. Main's failure blocks the tag image build.One-dispatch release command (NOT executed)
Run this once this lineage and
chore(release): 1.21.0(taggedv1.21.0) are on main:Rolling the release back = DB snapshot restore (a separate decision) + the documented captured pre-N0 rollback to 1.20.6, with the explicit privacy mode.
Evidence (tests first)
970a34f: recovery workflow suite 20/20 (adds release substitution; truthful-release refusals for untagged / tag elsewhere / crate mismatch / build path; template-drift refusals for profile / ingress digest / approved pre-cap bytes / CRLF / duplicate node / quoted node); quota authority 20/20; Docker tags 8/8; deploy-ref 16/16; Policy probes 13 scenarios;scripts/tc959-check.mjspass; log-shipper/tc959 node tests 32/32; actionlint v1.7.12 clean (shellcheck/pyflakes unavailable/disabled).No production/Phala/billing request, credential read, workflow dispatch, merge, or push to #309/#313.
Rendered release compose (harness, release digest substituted): differs from main's compose only by the node image line (the release digest, no
4bdae4fc) andCLIENT_MAX_BODY_SIZE95m.TINYCLOUD_EPOCH_HEAD_BACKFILL__ENABLED: "false"and #346's Vector config are retained.