chore(ci): append run number to refresh-counts branch name#608
Merged
chore(ci): append run number to refresh-counts branch name#608
Conversation
Same-day re-dispatches collided on the date-only branch name chore/refresh-counts-YYYYMMDD. PR #605 on 2026-05-09 was closed without merging, leaving its branch on the remote; today's manual dispatch (run 25599788412) failed at `git push` because the remote already had a branch with that name and a different history (the fast-forward check rejected the push). Append GITHUB_RUN_NUMBER so each dispatch creates a unique branch. The PR-noise filter from PR #606 already prevents no-op runs from opening PRs at all, so this won't multiply daily PRs — only material runs result in a PR.
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.
Summary
Same-day re-dispatches of the unified
refresh-counts.ymlworkflow collide on a date-only branch namechore/refresh-counts-YYYYMMDD. Today's smoke test of the per-package HWM migration (PR #607) caught it — the dispatch failed atgit pushwith:PR #605 (closed without merging earlier today) had pushed
chore/refresh-counts-20260509to the remote with one commit; the new dispatch created a different commit on the same branch name locally, andgit pushcorrectly refused the non-fast-forward.Fix
Append
GITHUB_RUN_NUMBERto the branch name:Each run gets a unique branch. No more push collisions.
Why not force-push instead
git push --forcewould have worked, but:gh pr createwould still error if a closed PR exists for the same head→base pair, requiring an additional reopen-or-create branch in the workflow.A unique branch per run avoids both issues with a single-line change. The PR-noise filter from PR #606 still suppresses no-op runs, so this won't multiply daily PRs — only runs with material data changes create a PR.
Test plan
chore/refresh-counts-20260509)npmByPackage,pypiByPackage,cratesByPackagepopulated)Cleanup of stale branches
The orphan branches
chore/refresh-counts-20260509(from PR #605) and the failed local-only state from today's run can be deleted manually after this lands. Future runs use unique names so this category of orphan is bounded — only material-data PRs leave a branch behind, and once merged or closed those branches are typically auto-deleted.