fix(ci): keep flake-sync to one open pull request - #46
Merged
Conversation
The branch name carried the run id, so every push to main during a merge batch opened another sync pull request for the same drift. Seven merges on 26 July produced five; one landed and the rest went stale and conflicted. A fixed branch, force-pushed, updates the open pull request instead. A concurrency group serialises runs, since two overlapping runs would otherwise race to write that branch and an older main event could win, leaving the pull request describing a stale lockfile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closing #30 turned up why it existed.
flake-synctriggers on push to main and named its branch after the run id, so when seven queued pull requests merged between 22:00 and 22:06 UTC on 26 July, each push started a run, each correctly saw the same drift, and each opened its own pull request. #29 landed and fixed the hash; the other four went stale and conflicted. The[skip-flake-sync]marker worked, so this was redundancy rather than a loop.bot/flake-sync, force-pushed with a lease. An already-open sync pull request is updated and re-armed rather than duplicated, and its body is refreshed so it cannot describe an older hash transition than the diff it carries.