~ knotless Search/
↑↓ move↵ open⇧↵ all results

grain.social/grain

photography-focused photo sharing platform

grain.social
1 collaborator
0
2

Deploys and lexicon publishes wait on the Rust checks too

Closed
Closed chadtmiller.com asked to merge into feature/rust from grain.social/grain:infra/ci-gates

What changes

Deploys wait on every check. deploy.yml and publish-lexicons.yml waited on test check, the Node app's, alone, so a Rust failure on main would not have stopped a deploy or a lexicon publish. Both now wait on check test rust harness. Deploy waits over two steps, checks done (waits, never fails) then checks pass (judges), each under the runner's 30 minutes a step, as knotless's deploy.yml does, since four checks behind a busy runner can outlast one step's 25 minutes.

Pre-flight. check.yml, test.yml, rust.yml and harness.yml take queue: first, with knotless's comments: the merge queue takes a pull into a batch only once these have passed at its head.

Cutover notes. rust.yml and harness.yml say they become check.yml and test.yml, as knotless names them, over the Node ones, and that deploy's and publish's lists then go back to check test (plus lexicons). The Node check.yml and test.yml say they are replaced then, and that what check.yml checks of web/ moves to a web.yml as knotless's does.

Mirrors knotless's .knotless/workflows/check.yml, test.yml (queue: first and its comments) and deploy.yml (the list of every check, and the checks done / checks pass pair).

Why

Until cutover the Node app still deploys from main, so its checks stay; but the Rust half lands on main with this branch, and a check that does not gate deploy is one nobody has to fix. Renaming now would break the Node app's gate, so the rename is left to cutover, written down where it will be done.

How it was checked

YAML read over by hand; this pull's own checks run the four pre-flight workflows with queue: first. deploy.yml and publish-lexicons.yml run only on main, so their new steps first run when this branch lands there.

Shortcomings

  • Not copied: knotless's harness/changes.sh. It asks a pull changing knotless's published client crates for a knope change file; grain publishes no client package and has no .changeset/, so there is nothing for it to check.
  • Not ported from knotless's harness/cov.mjs: COV_STORE (the cache of passing test runs, /opt/testcache), COV_NETS (stock-only on pulls, the spaces alpha on the batch) and the alpha net. Each is a couple of hundred lines entangled with the spaces alpha build; worth doing once grain's tests run against the alpha too, not as a gate change.
  • lexicons is not in the lists: the lexicon lint is its own pull, which says to add it here once both land.
  • Publish-lexicons waits over one step, as knotless's does.

Review

A quick look: the two for wf in lists and the new deploy step.

🤖 Generated with Claude Code

Approved an earlier version

This pull makes deploy.yml and publish-lexicons.yml wait on check test rust harness. It splits deploy's wait into checks done, which never fails, and checks pass, which judges. It also adds queue: first to the four pre-flight workflows and writes the cutover notes into the comments.

I read the two for wf in lists and the new deploy step, and they are consistent. rust and harness both run on pushes to main, so deploy and publish will find those checks to wait on. In checks done, || true and break on an exhausted budget keep the step from failing, and checks pass still fails closed. It also removes the candidate image when a check hasn't passed. Both steps are under the 30-minute step limit.

This pull's four checks were still queued when I looked, so I can't say they passed. As the description says, the new deploy and publish steps run only on main, so their first real run is after this lands.

Approved

Since my last review, the pull only gained a merge of batch/one (head 8ec5991). The merge's one conflict was in harness.yml. I read the resolved file: the queue: first line and its comment, and the cutover note, are intact, and the on and cache blocks and steps are coherent. Nothing from my earlier review needed changing, and the deploy and publish changes I looked at then are untouched by the merge. The four pre-flight checks (check, test, rust, harness) are still queued at this commit, so I can't say they pass. The new deploy and publish steps run only on main, as the description says.

Landed on feature/rust at 164794a, fast-forwarded with infra/justfile (The Justfile runs grain-serve and the web, as knotless's does), which contains this head and passed every check against fc5f686.