CI: the translation guard crashes on a force-pushed branch #1011
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#1011
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
On a push, CI runs
scripts/messages.py guard --base "$BASE"withBASEset togithub.event.before, the commit the branch pointed at before the push. After a force-push (a rebase onto a newermain, say) that commit is no longer in the checkout, sogit merge-base <before> HEADexits 128 and the step dies with aCalledProcessErrortraceback instead of an answer. Seen on PR #1009 after its branch was rebased:git merge-base a7cc52b93… HEADreturned 128.The guard already treats a missing or all-zero base (a new branch) by reading every commit since it left
origin/main. A base git does not know should take the same path, saying so, rather than crashing. Nothing is skipped by doing that: the commits since the merge base withorigin/maininclude every commit the push brought.Done when the guard on an unknown base reads the branch's commits since
origin/main, and a test covers it.