Stop the release-script tests reading the file under them #384

Merged
robbertbos merged 1 commit from release-scripts-fixture into main 2026-09-20 08:11:07 +00:00
Owner

release-scripts fails on main now and then, most recently on 5529ffc3 while a second run of the same workflow was in flight. #137 added a three-attempt retry for this; the retry does not help, because the other checkout outlives it.

Cause: the section tests ran changelog-section.sh against the checkout's own CHANGELOG.md. A concurrent job re-checking out the workspace empties that file for a moment, and the script then reports an empty section for a tag that has one - which is exactly what #137 observed without being able to name it.

The tests now read a snapshot taken once at the start, through the CHANGELOG_FILE variable the scripts already honour. The newer frozen-check tests already worked this way in their own temp repos. The retry in ci.yml goes with it: a flake that survives this has a different cause and should be visible rather than papered over.

Measured, not assumed: a harness that truncates CHANGELOG.md in a loop while the suite runs fails the two section tests on main's version and passes on this one. Locally: 29 tests, exit 0.

`release-scripts` fails on main now and then, most recently on 5529ffc3 while a second run of the same workflow was in flight. #137 added a three-attempt retry for this; the retry does not help, because the other checkout outlives it. Cause: the section tests ran `changelog-section.sh` against the checkout's own `CHANGELOG.md`. A concurrent job re-checking out the workspace empties that file for a moment, and the script then reports an empty section for a tag that has one - which is exactly what #137 observed without being able to name it. The tests now read a snapshot taken once at the start, through the `CHANGELOG_FILE` variable the scripts already honour. The newer frozen-check tests already worked this way in their own temp repos. The retry in `ci.yml` goes with it: a flake that survives this has a different cause and should be visible rather than papered over. Measured, not assumed: a harness that truncates `CHANGELOG.md` in a loop while the suite runs fails the two section tests on main's version and passes on this one. Locally: 29 tests, exit 0.
Stop the release-script tests reading the file under them
All checks were successful
CI / release-scripts (pull_request) Successful in 12s
security-scan / SBOM (trivy) (pull_request) Successful in 12s
security-scan / Filesystem scan (trivy fs) (pull_request) Successful in 19s
security-scan / JS SCA (npm audit) (pull_request) Successful in 21s
security-scan / Python SAST (bandit) (pull_request) Successful in 27s
security-scan / Python SCA (pip-audit) (pull_request) Successful in 45s
test-build / build (frontend) (pull_request) Successful in 1m9s
CI / pre-commit (pull_request) Successful in 1m10s
test-build / build (backend) (pull_request) Successful in 1m10s
test-build / build (pull_request) Successful in 0s
CI / frontend-test (pull_request) Successful in 1m11s
CI / backend-test (pull_request) Successful in 2m49s
CI / e2e (pull_request) Successful in 4m41s
CI / release-scripts (push) Successful in 8s
security-scan / SBOM (trivy) (push) Successful in 13s
security-scan / JS SCA (npm audit) (push) Successful in 15s
security-scan / Filesystem scan (trivy fs) (push) Successful in 18s
security-scan / Python SAST (bandit) (push) Successful in 18s
security-scan / Python SCA (pip-audit) (push) Successful in 38s
CI / frontend-test (push) Successful in 59s
CI / pre-commit (push) Successful in 1m8s
publish-and-stage / build (backend) (push) Successful in 1m14s
publish-and-stage / build (frontend) (push) Successful in 2m4s
publish-and-stage / build (push) Successful in 0s
CI / backend-test (push) Successful in 2m43s
publish-and-stage / deploy-staging (push) Successful in 1m48s
CI / e2e (push) Successful in 4m20s
538737a275
The job failed whenever a second run checked out the workspace mid-test:
changelog-section.sh then read an empty CHANGELOG.md and reported an
empty section for a tag that has one. Three retries did not help, because
the other checkout outlives them.

The section tests and the frozen check now read a snapshot taken once at
the start, through the CHANGELOG_FILE the scripts already honour, so a
concurrent checkout cannot reach them. The retry in ci.yml goes with it:
a flake that survives this is a different cause and should be visible.

Measured both ways with a harness that truncates CHANGELOG.md in a loop:
the previous version fails the two section tests, this one passes.
robbertbos deleted branch release-scripts-fixture 2026-09-20 08:11:07 +00:00
Sign in to join this conversation.
No reviewers
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
robbertbos/waggle!384
No description provided.