Landings write a landed library's users' bumps onto main in dependency order (MQ-8) #46

Merged
merge-queue merged 3 commits from anvil-landings into main 2026-12-01 00:44:04 -08:00
Owner

https://openproject.home.romaine.life/wp/MQ-8: once a change to a Go library other modules use reaches its default branch, the queue writes each user's dependency bump onto its default branch itself, nearest first, one commit per repository, replacing the take-up PR every release opened in each user once per path through the graph (tonight's ~160 and ~196 job floods). Held: it lands with infra-bootstrap's push permission for the merge-queue user (infra-bootstrap#56), after strip-owner waits for bumps on main (pr#21), and before pipeline-templates removes the take-up cascade (pipeline-templates#339).

Added

  • landing.go. What makes a landing: at each fetch of a Go repository, what reached its default branch since a cursor kept on the volume (DATA_DIR/landings/cursors.json; a repository's first read sets it). The files the commits since change, the queue's own bump commits aside (author merge-queue, subject Take ...), make a landing when they change a library with users, read as a group test reads them. So a library merged by the queue, by pull-request merge or by a direct push all reach their users, and a push made while the service was down is found at its first fetch. No branch is read until the clones are warm (before then a library could look unused). A branch rewritten past its cursor moves it with a warn line.
  • Working a landing (one at a time, oldest first, kept as JSON on the volume and resumed after a restart): wait for the library's release/ci.yml push run on the commit to end and take its tag there as the version (none: users take nothing); bump each user once every landing module it requires has a known version — worktree of its default branch, go get mod@version... and go mod tidy per module folder, one commit, pushed (refused because the branch moved: redone on the new head, up to three times); a user that is a module waits for its own release run on the bump, whose tag is the next level's version. no-take-up repos skipped; already-current ones unchanged; a failing go command fails that repo's bump with a warn line and, for a landing a PR merged, a comment on that PR (the form pr#21 reads), and the rest go on; a cycle of requires fails the same way.
  • Steps come from any run or push in a repository a held landing waits on. GET /landings (in-cluster) lists landings not done; merge_queue_bumps_total{result}.
  • Clones fetch tags (refspecs named on every fetch, so existing clones take them), FetchNow, TagsAt; client CommitPR, CommitURL, ReleaseRun.
  • The image is Go's (same digest as the build stage); Go's caches and temp files on the volume, GOENV=off, GOTELEMETRY=off; self-test checks go version.

Changed: a library change of only go.mod/go.sum is group-tested now (there are no take-ups to exempt once the cascade goes). README's merge-up section speaks of landings' bumps instead of take-ups.

Left alone: PRs that change no library with users; the group test otherwise.

Tests (landing_test.go, real git and real go against bare repositories, fake Forgejo for runs): a push to lib makes a landing; lib → mid → app bumped in order, app taking both versions in one commit; the queue's own bumps make no landing; a release with no tag bumps nobody; no-take-up skipped while the rest go on; a restart resumes. Run three times in a row clean after fixing a startup ordering race (a library read before its users were loaded looked unused).

🤖 Generated with Claude Code

https://openproject.home.romaine.life/wp/MQ-8: once a change to a Go library other modules use reaches its default branch, the queue writes each user's dependency bump onto its default branch itself, nearest first, one commit per repository, replacing the take-up PR every release opened in each user once per path through the graph (tonight's ~160 and ~196 job floods). Held: it lands with infra-bootstrap's push permission for the `merge-queue` user (infra-bootstrap#56), after strip-owner waits for bumps on main (pr#21), and before pipeline-templates removes the take-up cascade (pipeline-templates#339). **Added** - `landing.go`. **What makes a landing**: at each fetch of a Go repository, what reached its default branch since a cursor kept on the volume (`DATA_DIR/landings/cursors.json`; a repository's first read sets it). The files the commits since change, the queue's own bump commits aside (author `merge-queue`, subject `Take ...`), make a landing when they change a library with users, read as a group test reads them. So a library merged by the queue, by `pull-request merge` or by a direct push all reach their users, and a push made while the service was down is found at its first fetch. No branch is read until the clones are warm (before then a library could look unused). A branch rewritten past its cursor moves it with a warn line. - **Working a landing** (one at a time, oldest first, kept as JSON on the volume and resumed after a restart): wait for the library's `release/ci.yml` push run on the commit to end and take its tag there as the version (none: users take nothing); bump each user once every landing module it requires has a known version — worktree of its default branch, `go get mod@version...` and `go mod tidy` per module folder, one commit, pushed (refused because the branch moved: redone on the new head, up to three times); a user that is a module waits for its own release run on the bump, whose tag is the next level's version. `no-take-up` repos skipped; already-current ones unchanged; a failing `go` command fails that repo's bump with a warn line and, for a landing a PR merged, a comment on that PR (the form pr#21 reads), and the rest go on; a cycle of requires fails the same way. - Steps come from any run or push in a repository a held landing waits on. `GET /landings` (in-cluster) lists landings not done; `merge_queue_bumps_total{result}`. - Clones fetch tags (refspecs named on every fetch, so existing clones take them), `FetchNow`, `TagsAt`; client `CommitPR`, `CommitURL`, `ReleaseRun`. - The image is Go's (same digest as the build stage); Go's caches and temp files on the volume, `GOENV=off`, `GOTELEMETRY=off`; self-test checks `go version`. **Changed**: a library change of only `go.mod`/`go.sum` is group-tested now (there are no take-ups to exempt once the cascade goes). README's merge-up section speaks of landings' bumps instead of take-ups. **Left alone**: PRs that change no library with users; the group test otherwise. Tests (`landing_test.go`, real git and real `go` against bare repositories, fake Forgejo for runs): a push to lib makes a landing; lib → mid → app bumped in order, app taking both versions in one commit; the queue's own bumps make no landing; a release with no tag bumps nobody; no-take-up skipped while the rest go on; a restart resumes. Run three times in a row clean after fixing a startup ordering race (a library read before its users were loaded looked unused). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Landings write a landed library's users' bumps onto main in dependency order (MQ-8)
All checks were successful
Suite cluster-service / scope (push) Has been skipped
Suite cluster-service / check-manifests (push) Has been skipped
Suite cluster-service / check-image (push) Has been skipped
Suite cluster-service / check-smoke (push) Has been skipped
Suite cluster-service / publish (push) Has been skipped
Suite cluster-service / reused-checks (push) Has been skipped
Suite cluster-service / check-manifests (pull_request) Has been skipped
Suite cluster-service / publish (pull_request) Has been skipped
Suite go / check-services (pull_request) Has been skipped
Suite cluster-service / scope (pull_request) Successful in 28s
Suite cluster-service / check-smoke (pull_request) Has been skipped
Suite default / scope (pull_request) Successful in 21s
Suite go / scope (pull_request) Successful in 23s
Suite go / check-test-windows (pull_request) Has been skipped
Suite go / check-format (pull_request) Successful in 42s
Suite cluster-service / check-image (pull_request) Successful in 1m44s
Suite default / check-fetches (pull_request) Successful in 23s
Suite default / check-rules (pull_request) Successful in 23s
Suite default / reused-checks (pull_request) Successful in 13s
Suite default / check-logs (pull_request) Successful in 33s
Suite go / check-test-linux (pull_request) Successful in 1m32s
Suite go / reused-checks (pull_request) Successful in 13s
Suite cluster-service / reused-checks (pull_request) Successful in 12s
cd3686b06c
A landing is whatever reaches a library's default branch, read against a cursor; take-ups are no longer exempt from group tests (MQ-8)
Some checks failed
Suite default / scope (pull_request) Has been cancelled
Suite default / check-fetches (pull_request) Has been cancelled
Suite default / check-rules (pull_request) Has been cancelled
Suite default / check-logs (pull_request) Has been cancelled
Suite default / reused-checks (pull_request) Has been cancelled
Suite go / scope (pull_request) Has been cancelled
Suite go / check-format (pull_request) Has been cancelled
Suite go / check-test-linux (pull_request) Has been cancelled
Suite go / check-test-windows (pull_request) Has been cancelled
Suite go / check-services (pull_request) Has been cancelled
Suite go / reused-checks (pull_request) Has been cancelled
Suite cluster-service / scope (pull_request) Has been cancelled
Suite cluster-service / check-manifests (pull_request) Has been cancelled
Suite cluster-service / check-image (pull_request) Has been cancelled
Suite cluster-service / check-smoke (pull_request) Has been cancelled
Suite cluster-service / publish (pull_request) Has been cancelled
Suite cluster-service / reused-checks (pull_request) Has been cancelled
Suite cluster-service / scope (push) Has been skipped
Suite cluster-service / check-manifests (push) Has been skipped
Suite cluster-service / check-image (push) Has been skipped
Suite cluster-service / check-smoke (push) Has been skipped
Suite cluster-service / publish (push) Has been skipped
Suite cluster-service / reused-checks (push) Has been skipped
6db703d309
README: a merge-up settles a PR against a landing's bump
All checks were successful
Suite default / check-fetches (pull_request) Has been skipped
Suite cluster-service / check-manifests (pull_request) Has been skipped
Suite cluster-service / check-smoke (pull_request) Has been skipped
Suite cluster-service / scope (push) Has been skipped
Suite cluster-service / check-manifests (push) Has been skipped
Suite cluster-service / check-image (push) Has been skipped
Suite cluster-service / check-smoke (push) Has been skipped
Suite cluster-service / publish (push) Has been skipped
Suite cluster-service / reused-checks (push) Has been skipped
Suite cluster-service / publish (pull_request) Has been skipped
Suite default / scope (pull_request) Successful in 5s
Suite cluster-service / scope (pull_request) Successful in 6s
Suite go / scope (pull_request) Successful in 5s
Suite go / check-test-windows (pull_request) Has been skipped
Suite go / check-services (pull_request) Has been skipped
Suite go / check-test-linux (pull_request) Successful in 20s
Suite default / check-rules (pull_request) Successful in 9s
Suite default / check-logs (pull_request) Successful in 12s
Suite default / reused-checks (pull_request) Successful in 10s
Suite cluster-service / check-image (pull_request) Successful in 40s
Suite go / check-format (pull_request) Successful in 6s
Suite go / reused-checks (pull_request) Successful in 11s
Suite cluster-service / reused-checks (pull_request) Successful in 12s
merge-queue landed on main
50cced41c3
merge-queue deleted branch anvil-landings 2026-12-01 00:44:04 -08:00
Sign in to join this conversation.
No reviewers
No labels
queue
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/merge-queue!46
No description provided.