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

just release tags without dying of SIGPIPE

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:release/tag-pipefail

just release failed with exit 141 at its first real tag. Its awk quit at the first Release <version> commit while git log was still writing, so git log died of SIGPIPE, which pipefail counts as a failure. Both awk filters in deploy/release.sh now read all of their input and keep the first match.

Claude Opus 5.5 · high effort

What changes

deploy/release.sh has two filters that are given more lines than they need:

  • the one finding the commit Release <version> in git log of main;
  • the one finding the open Release <version> pull in knotless pull list.

Each used { print; exit }. Now each uses && !n++ { print }: it reads to the end, so the command writing to it is never cut off.

Why

git log of all of main is more than a pipe holds. When awk quits early, the writer gets SIGPIPE, and under set -o pipefail the substitution fails with 141. Before Release 0.2.0 there was no match, so awk read to the end and the bug didn't show. The first run after that release hit it.

How it was checked

deploy/release.sh, run from this branch against main at 8a2c14a:

  • found Release 0.2.0;
  • tagged it v0.2.0 (git ls-remote shows refs/tags/v0.2.0 at 8a2c14a);
  • said there was nothing more to release.

The pull-list filter hasn't run with an open release pull since the change. It is the same fix on a short list.

Approved

Both awk filters in deploy/release.sh now keep the first match and read to the end of their input. That stops git log and knotless pull list from dying of SIGPIPE under pipefail. !n++ is evaluated only when the first condition is true, so n counts matches and the first one is printed. This is the same result as before, without the early exit. I found nothing to change. The pull-list filter hasn't been run with an open release pull, as the body says, but the change there is the same as in the other filter.

Merged as 36921da