Skip to content
CommonLayer
Documentation menu
On this page

ADR-0048: CI spends runner time on the newest commit and on what changed

Status: Accepted. Implemented in .github/workflows/ and .github/scripts/changed.sh; rules for contributors in repository settings.

Context

Every push to main started ci and security, and path-filtered workflows on top. The kind job of infra builds three images in release mode (about an hour) and started for any change under .github/. A series of small pushes ran the whole set once per push, and a run kept going after a newer push had made it irrelevant.

Decision

  • A newer push to the same branch or pull request cancels the run in progress, on main too. The release workflows and the daily rescan never cancel.
  • The kind job runs only when the chart, the platform Dockerfiles, the charts it depends on or the job itself changed. A first job decides with .github/scripts/changed.sh; when the base commit is unknown the job runs.
  • Work in progress is pushed with [skip ci] in the newest commit's message. The last push of a series carries no marker, so the series is checked once.
  • ci, docs and infra can be started by hand, because a run started by a push compares only with the commit before that push.
  • The nightly end-to-end run builds the stack and runs the browser suite only when main received a commit in the last 26 hours.
  • A file the backend embeds at compile time must be in the backend image's narrow build context. scripts/check-build-context.py checks that in the Rust lint step, because the image build that would otherwise find it runs rarely. (The first nightly run after the stewardship work, 42998340850, failed on exactly this.)

Alternatives rejected

  • Path filters on ci. The portal renders docs/, and three generated documents are compared with the code, so a documentation change is not independent of the application checks.
  • Running the heavy workflows only nightly. A broken chart or image would be found a day later and by nobody in particular.

Consequences

  • A superseded commit on main shows a cancelled run. Only the newest commit is known to be checked in full.
  • A commit pushed with [skip ci] is unchecked until the next run. Releases are never tagged from one.
  • After skipped pushes, a path-filtered workflow sees only the last push. Whoever pushes the series checks which workflows started and starts the others by hand.