Skip to content

[2.0] Fixes 38699: Never give an approval back to its requester (#38708) - #38829

Merged
yan-3005 merged 1 commit into
2.0from
backport/2.0/pr-38708
Nov 26, 2026
Merged

yan-3005 merged 1 commit into
2.0from
backport/2.0/pr-38708

Conversation

@yan-3005

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #38699

Backport of #38708 to 2.0, ported by hand (the cherry-pick conflicted):

Type of change:

  • Bug fix

Tests:

  • SetApprovalAssigneesImplTest: Tests run: 17, Failures: 0, Errors: 0. New cases:
    • the event-driven sole requester is never assigned, and the run auto-approves;
    • it is routed to the other admins;
    • when the requester is the only admin, the task stays open.
  • WorkflowDefinitionResourceIT, mysql-elasticsearch, global-state lane:
    • Full class: 91 run, 3 errors, all from the untouchedTable setup above.
    • After fixing the setup:
      • the 3 tests plus the 12 matrix cases gave Tests run: 15, Failures: 0, Errors: 0;
      • test_editorWhoIsTheOnlyApproverIsNeverAskedToApprove and test_editorIsLeftOffTheApprovalWhenSomeoneElseCanApprove passed 6/6 each.
  • Reproduced on 2.0 before the fix: the task went to the editor only, filed by the editor, and their resolve returned 403 TaskAuthorPolicy-FilerCannotResolveOwnTask.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have added tests and listed them above.
  • Decision check: carries docs/decisions/2026-11-25-an-approval-never-goes-to-its-requester.md, adapted to 2.0.

🤖 Generated with Claude Code

Backport of #38708, ported by hand: 2.0 has no "wait" empty-assignee
strategy and gave the requester back under every strategy, so the
assignAdmins fallback never ran for an event-driven approval.

The requester is now never an assignee of an approval their own edit
started. An emptied list goes to the node's empty-assignee strategy: none
approves automatically, assignAdmins assigns the other admins and, as on
main since #35740, keeps the task open when the requester is the only
admin instead of approving it.
@yan-3005
yan-3005 requested a review from a team as a code owner November 26, 2026 09:58
@yan-3005
yan-3005 requested review from sonika-shah and removed request for a team November 26, 2026 09:58
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🔴 High risk

Shared approval logic now auto-approves under none when the requester is the sole approver, potentially allowing changes without independent review.

Backport of the approval fix so an approval is never assigned back to its requester: an emptied assignee list now follows the configured strategy, with none auto-approving and assignAdmins routing to the other admins. When the requester is the only admin, the task stays open instead of self-approving. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@yan-3005 yan-3005 added skip-pr-checks Bypass PR metadata validation check and removed skip-pr-checks Bypass PR metadata validation check labels Nov 26, 2026
@yan-3005
yan-3005 merged commit a2f95c4 into 2.0 Nov 26, 2026
64 of 68 checks passed
@yan-3005
yan-3005 deleted the backport/2.0/pr-38708 branch November 26, 2026 10:27
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