fix: auto-create missing split repos and cancel superseded runs#65
Merged
Conversation
Two related fixes to the Split Packages workflow: 1. **Auto-create missing split repos.** The setup job now runs bin/create-split-repos.sh before the matrix fans out. Previously, auto-creation only happened via bin/release.sh, so a plain merge to develop that introduced a new package would fail at the git push step with "Repository not found" — as just happened for the three page-cache packages in run 25739254101. The script is idempotent and completes in ~1s when no repos are missing. 2. **Cancel superseded branch runs.** cancel-in-progress was hard-coded to false, so rapid pushes to develop queued and each run repeated the full 80-package split. Now branch pushes cancel older runs while tag pushes (release artifacts) never cancel. Note: SPLIT_TOKEN must have permission to create repos under marko-php (classic: repo scope; fine-grained: Administration: write + Contents: write). If the current token only has push rights, this step will fail and the token needs to be rotated/broadened. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
developthat introduces a new package doesn't fail at the git push step with "Repository not found" (as just happened for the three page-cache packages in run 25739254101). Previously, repo auto-creation only ran duringbin/release.sh.cancel-in-progresswas hard-coded tofalse, so rapid pushes todevelopqueued and each run repeated the full 80-package split. Now branch pushes cancel older runs; tag pushes (release artifacts) never cancel.The auto-create step calls the existing idempotent
bin/create-split-repos.sh(~1s when no repos are missing, single batchedgh repo listcall).Token scope note
SPLIT_TOKENmust be able to create repos undermarko-php:reposcopeAdministration: write+Contents: writeon the orgIf the current token only has push rights, the new step will fail and the token needs to be rotated/broadened.
Test plan
SPLIT_TOKENhas repo-creation permission onmarko-php(or rotate it)setupjob runscreate-split-repos.shsuccessfully (no-op since all current repos exist)🤖 Generated with Claude Code