Prepared landings: a library change's landing is planned when its group test starts, its releases prebuilt, its planned bumps pushed (MQ-11 step 5b) #56
Loading…
Reference in a new issue
No description provided.
Delete branch "mq-11-prepare"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Step 5b of stage 6b of the anvil build: prepared landings and the prebuild dispatch, not yet required for landing. Work package: https://openproject.home.romaine.life/wp/MQ-11
Added
prepare.go: when a library change's group test is dispatched (front, or speculative inside the window), anvil plans its landing behind the look: the library's next tag; each user's bump nearest first, made in a worktree of its clone withgo getof the planned versions andgo mod tidythrough anvil's module proxy (GOPROXY=<loopback proxy>/goproxy/<plan>|file://<DATA_DIR>/go/mod/cache/download|<home proxy>|direct,GONOPROXY=anvil.invalid, a per-planGOMODCACHEremoved after), committed withgit commit-tree(author and committermerge-queue, dated the plan's time, unsigned, the bump's message plusAnvil-Prebuilt: <lib>@<head>), kept atrefs/anvil/plans/<plan>/<repo>; each user's next tag. A module user's planned version is served from its planned commit to the users after it.ci-releaseand doesn't number from its files, and the proxy self-check isok. Users that areno-take-up, nested, take nothing, aren't on the release suite, or whosegofails get"prebuild": false, and their subtree too.DATA_DIR/plans/<id>.jsonin exactlyrelease/group.mjs's version-1 format, plus<id>.anvil.json(sums, bumps, run, landing). Read back at restart.release/group.ymlon the PR branch withprandplan{"id","digest"}when the PR's head is still the planned one, and reports it asmerge-queue / group release(pending, then success/failure, each[p:<id>]), settled at the next look on the head or, once landed, at the landing's step. Never counted as CI; a failed or refused prebuild is awarnline and a failed status, nothing more.GET /prebuild/<id>.json(token-checked as/goproxyis, routed publicly beside it ink8s/route.yaml) andGET /plans(inside the cluster).releasetag.go: release-version'snextTag()numbering ported to Go, tested against release-version's own fixtures. The image's pinned@romaine-life/ci-suitesis 0.1.6, which has nopredict.mjs(it first ships in 0.1.7), so the port is what predicts tags.prepare_test.go,releasetag_test.go,testdata/): plan made and prebuild dispatched; each planned commit equals group.mjs's recreation done step by step in git; the plan bytes and commits against a golden file written by group.mjs's ownparsePlanandrecreate(live withPIPELINE_TEMPLATES); planned commits pushed as fast-forwards; fallback when main moved; a mismatched library tag dropping the plan for every user; a failed prebuild stepping nothing aside; plans surviving a restart. Also: an already-pushed planned commit counted as the bump; a re-pushed head with the same tree getting its own prebuild; a plan that stops partway leaving no refs; zips refcounted with their plans and the store bounded; the planner given while the landings step (fails under -race only).Changed
landing.go: a recorded landing takes the newest plan whose head tree is its merge commit's. Each planned version's real tag must match the prediction, andgo mod download -jsonof it must give the plannedh1:sums. A user whose bump takes exactly its planned versions gets the planned commit pushed as a fast-forward while main is still its parent; if main moved, today'swrite()on the new head with the plan's message and trailer. Any other mismatch: today's path for that user and downstream, aplan droppedline with reason, and the landing'splanOff. The plan is released and pruned once the landing is done. A planned commit already on main (pushed before a restart cut the step short of saving it) is the bump, pushed, not "unchanged". The landings read the planner through an atomic pointer, since it is set after their runner may have started.write()takes its message;goCmdgains an environment override.queue.go:merge-queue / group releaseis read into its own field, so it is never CI; the look settles a pending prebuild on a head it read fresh.groups.go:dispatchGroupasks the planner for a plan.goproxy.go: a loopback listener for anvil's own go commands (Go sends GOPROXY credentials over https only),unregister, and each module's self-check result. A zip goes with the last plan that holds it (refcounted), and the zip store is bounded at 2 GiB, oldest first, with a gauge of its size.mirror.go:gitEnv, git with extra environment (a commit's author and dates).main.go: wiring and routes. README: Prepared landings, and the Module proxy, Landings, Observability, Configuration and Testing sections.Left alone
The batched delivery (
merge-queue / delivery), requiringmerge-queue / group releasefor landing, shadow mode and its files, the Dockerfile and its package pin, and the 6a landing path, which every plan falls back to.🤖 Generated with Claude Code
b6e1341aa811e1c65e9f