fix(repin): recover from a failed tag push (#796) #867
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!867
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/796-repin-tag-push-recovery"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Refs #796. A failed
rt repintag push no longer leaves a local tag that blocks the retry.Measured before the change: both the historical
scripts/repin.shand the Go port minted the local tag first, then pushed it. A failed push therefore leftrefs/tags/<rc>locally, and the next run stopped attag already exists locallyeven when the remote tag was absent. The existing clean-tree regression did not cover that ref residue.The Go path now pushes the detached bake commit directly to
refs/tags/<rc>and never creates a local tag before the push. If the push fails ambiguously, the error namesgit ls-remoterecovery and says to retry only when the remote tag is absent. Legacy local-tag residue gets the same remote-check plus conditionalgit tag -dguidance.Verification
go test -count=1 ./...: all packages passed.go vet ./...: passed.go build ./...: passed.golangci-lint run --timeout=5m:0 issues.go run ./cmd/rt fragment-check changelog.d: supported kinds and density passed; 2 fragments graded.git tagcall; the publish arm asserts the detached SHA-to-tag refspec and tag-before-branch ordering.<detached-sha>:refs/tags/<rc>created the remote tag while localgit tag --listremained empty.No reviewer was requested and no merge was performed, per dispatch.
Reviewed the exact head
e7d2d189e7and APPROVED.I verified the changed repin path and its failure controls: baking now leaves a detached commit and publishes it directly as :refs/tags/, with no local git tag creation; the tag push remains before the branch push. The failure path reports the remote-check/retry guidance, and the local-residue path checks git ls-remote before a conditional tag deletion. The focused repin tests, full go test, go vet, go build, and diff-check all pass. Forgejo reports all 12 required contexts successful.
Reviewed the exact head
e7d2d189e7and APPROVED.I verified the changed repin path and its failure controls: baking now leaves a detached commit and publishes it directly as :refs/tags/, with no local git tag creation; the tag push remains before the branch push. The failure path reports the remote-check/retry guidance, and the local-residue path checks git ls-remote before a conditional tag deletion. The focused repin tests, full go test, go vet, go build, and diff-check all pass. Forgejo reports all 12 required contexts successful.
Reviewed the exact head
e7d2d189e7and APPROVED.I verified the changed repin path and its failure controls: baking now leaves a detached commit and publishes it directly as :refs/tags/, with no local git tag creation; the tag push remains before the branch push. The failure path reports the remote-check/retry guidance, and the local-residue path checks git ls-remote before a conditional tag deletion. The focused repin tests, full go test, go vet, go build, and diff-check all pass. Forgejo reports all 12 required contexts successful.