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

grain.social/grain

photography-focused photo sharing platform

grain.social
1 collaborator
0
2

A feature/ branch's pushes warm the caches its pulls start from

Merged
Merged chadtmiller.com asked to merge into feature/rust from grain.social/grain:ci/warm-feature

What changes

rust.yml, harness.yml and e2e.yml run on pushes to refs/heads/feature/* as well as to main. A comment on each says why. e2e's header no longer says a pull's run has nothing kept until the workflow reaches main.

Why

Only a passing push to the default branch used to make a cache's base, and these three workflows exist only on feature/rust. So every pull into it started cold: Node downloaded, cargo built from nothing, the spaces alpha rebuilt (about 4.5 of a run's 7 minutes), and Chromium installed. The stored test runs harness/cov.mjs keeps in /opt/testcache were never kept either.

knotless 6c6ad8c8 gives a branch caches of its own for a workflow whose on.push.refs and on.pull.base both name it. Pulls into it start from them, and a branch with none yet starts from main's. The pull triggers already name feature/*; this adds the push half. runner.knotless.dev runs that commit from today.

How it was checked

CI's. The first passing run into feature/rust should make the branch's bases, and the run after it should skip the alpha's build and print "N of 37 runs passed before" in harness.

Shortcomings

  • check.yml and test.yml, the Node side's, are left as they are: they exist on main and warm from it.
  • The branch's bases take disk beside main's on the runner host, bounded by --cache-max and the disk floor.

🤖 Generated with Claude Code

chadtmiller.com added 1 commit
Approved

This adds refs/heads/feature/* to the push triggers of rust.yml, harness.yml and e2e.yml. The pull triggers already name feature/*, so a branch now has both halves, which the PR says the runner needs before it keeps caches for the branch. I read harness.yml in full. None of its steps publish, deploy or use secrets, so running them on a push is safe. I only skimmed the e2e.yml and rust.yml hunks. The comments match the new behaviour, and e2e's header no longer claims that a pull's run has nothing kept.

The change depends on runner behaviour (knotless 6c6ad8c8) that I can't check from here. The PR says CI will confirm it: the first passing push should make the bases, and the next run should skip the alpha build and print the "N of 37 runs passed before" line. Please check that, since a mistake in the config would only show as a cold run.

Approved

Carried forward: the change this pull makes at d4cd85ec36cf49a5f72bd7b53fe2614d476f7327 is the one reviewed at 44539eb6e192ff83346121b94704c3c2b32699ac, so that review stands. What is new comes from its base.

Merged as 7288cc6
Part of a stack of 2
  1. A feature/ branch's pushes warm the caches its pulls start from Landed as 7288cc6
  2. main