Skip to content

Record a request in pins.json before it queues - #2

Merged
bdbarnett merged 1 commit into
mainfrom
record-first
Oct 21, 2026
Merged

bdbarnett merged 1 commit into
mainfrom
record-first

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

A release request that waited behind a running build could be replaced by a later request, because GitHub's concurrency group keeps one pending run and a newer one replaces it. The release's pin was then never written to pins.json and its packages missed the index.

Now a record job runs the moment a request arrives, outside the queue, and commits the pin to main (tools/pins.py record, which starts again from the remote's pins.json if another request's commit lands first). Only the build and the deploy queue. Every build checks out main when it starts, so a build that replaces a pending one still publishes the pending one's release.

pins.json now says what was requested rather than what is live, so a pin whose build fails stays there until it is fixed or replaced.

tests/test_pins.py covers apply and record against a throwaway remote, including the stale-checkout and lost-push-race cases, and a new workflow runs it.

@bdbarnett
bdbarnett merged commit 7bbb04c into main Oct 21, 2026
1 check passed
@bdbarnett
bdbarnett deleted the record-first branch October 21, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant