Skip to content

ci: accept API break approvals only after the published release (stable/10) - #473

Merged
emilyoram merged 2 commits into
stable/10from
ci/api-approval-ancestry-stable-10
Nov 19, 2026
Merged

emilyoram merged 2 commits into
stable/10from
ci/api-approval-ancestry-stable-10

Conversation

@emilyoram

Copy link
Copy Markdown
Collaborator

Relates to #471 (backport to stable/10)

Adds --ancestry-path to the commit list in scripts/api-break-approvals.sh, so an api-break-approved label counts only on merges that descend from the published tag. A labelled merge on a history that diverged before the release (after a stable branch reset) can no longer approve dropping API only the published release had. The manual api_break_approved override still covers an intentional rollback. Same fix as camunda/orchestration-cluster-api-java#130.

New regression test_approval_search_ignores_merges_outside_the_published_history retags the baseline onto a sibling commit; it failed before the change (approved #1) and passes after. The gate test fake now requires the flag. test_api_compat.py, ruff, shellcheck and the branch type checker pass.

git log tag..HEAD also lists commits from histories that diverged before the published tag. After a stable branch reset, a labelled merge there could approve dropping API that only the published release had. --ancestry-path keeps only descendants of the tag; the manual override still covers an intentional rollback.

Closes #471
@emilyoram
emilyoram requested a review from a team as a code owner November 18, 2026 21:10
Copilot AI balanced review requested due to automatic review settings November 18, 2026 21:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the backport restricting API-break approval candidates to descendants of the published release tag.

No open issues 🎉

What changed in this PR

This stable/10 backport addresses #471 by restricting API-break approvals to merges that descend from the published release tag. It prevents approvals on divergent history from authorizing API removals while preserving the manual override for intentional rollbacks.

Changes:

  • Add --ancestry-path to the approval candidate search.
  • Add a divergent-history regression test and update the gate’s Git stub to require the flag.
File Description
tests/​acceptance/​test_api_compat.py Tests that approvals outside the published release’s history are ignored and updates the Git stub.
scripts/​api-break-approvals.sh Restricts approval candidates to descendants of the published tag.

Review effort: Balanced

git log --ancestry-path tag..HEAD still accepts a labelled merge when
a reset release branch reaches the published tag only through a
second parent: every later merge descends from the tag, though none
was made on the line it was released from. Require the tag on
HEAD's first-parent history and list only first-parent commits after
it; otherwise only the manual override can approve the release.
@emilyoram
emilyoram merged commit 87abd53 into stable/10 Nov 19, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants