Skip to content

[2.1] Fixes #38921: choose what happens when no one else can approve a step - #38968

Merged
yan-3005 merged 1 commit into
2.1from
backport/2.1/pr-38923
Nov 27, 2026
Merged

yan-3005 merged 1 commit into
2.1from
backport/2.1/pr-38923

Conversation

@gh-bot-collate

Copy link
Copy Markdown

Automated backport of #38923 to 2.1.

Source PR #38923
Author @yan-3005
Merge commit 52d2fd267530ac7f2ab484c6d8c511c75c4c2355
Method Clean cherry-pick — identical to the commit on main.

Opened from openmetadata-collate, which holds the credentials needed to open a PR here. It merges itself once this branch's required checks pass — no review needed. If a check fails it stays open and the author of #38923 is asked to look.

resolver run

…#38923)

* Fixes #38921: choose what happens when no one else can approve a step

The approval step form saved emptyAssigneeStrategy but showed no control for it,
so switching a step to assignAdmins or wait needed an API edit. Add a Select with
all three schema values, each with a hint, and a note that the setting also
covers an approver who made the change. The form's hand-written 'none' |
'assignAdmins' types become the generated EmptyAssigneeStrategy, so a step
saved with wait shows it instead of a blank select.

The OSS restrictions spec now picks Assign to admins and asserts the PUT; its
workflow skips every real table so other workers' tables never open admin tasks.

* Word the no-approver hints to match what the backend does

Under assignAdmins, when the requester is the only admin, the owner fallback can
still route the task to the asset's owners, so "never to the person who made the
change" overpromised; "no one is asked to approve their own change" did too, and
the none hint's "task stays unassigned" ignored the same fallback. List the
default option first, check the saved strategy after reopening the step, and
name the trigger filter for what it does (it excludes every table).

* Show the task-workflow outcome for none on noOp workflows

A task workflow (noOp trigger) never approves on its own: SetApprovalAssigneesImpl
keeps hasAssignees true for workflow-managed tasks, and the owner fallback sends
the open task to the asset's owners. Its read-only approval step showed "Approve
automatically" for the default; it now shows "Go to the asset's owners" with a
matching hint.

* Never hand a task back to its creator; let a later step approve on its own

Owner fallback: a task created with no assignee fell back to all the asset's
owners, so under assignAdmins with the requester as the only admin it could
assign the requester, who as filer cannot resolve it. The fallback now skips
the task's creator.

Later approval steps: the first step's CreateTask leaves taskEntityId at process
scope, and a step read any taskEntityId as a task workflow's, so a second step
with nobody to ask opened a task under none instead of approving. A taskEntityId
whose task belongs to an entity-event workflow no longer counts.

UI: the builder offers Approve automatically and Assign to admins; a step that
already stores wait still shows it. The Assign to admins hint names the owner
fallback, and the doubled margin above the select is gone. ADR 2026-11-25 gets a
v2 amendment.

* Regenerate the Playwright impact map

(cherry picked from commit 52d2fd2)
@gh-bot-collate
gh-bot-collate Bot requested review from a team as code owners November 27, 2026 11:20
@gh-bot-collate
gh-bot-collate Bot requested review from sonika-shah and sweta1308 and removed request for a team November 27, 2026 11:20
@gh-bot-collate gh-bot-collate Bot added the safe to test Add this label to run secure Github workflows on PRs label Nov 27, 2026
@gh-bot-collate

Copy link
Copy Markdown
Author

🤖 This backport will not merge itself: 2.1 has no required status checks, so there is nothing for auto-merge to wait on. Merge it by hand once CI is green.

@yan-3005 yan-3005 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.

Clean cherry-pick of #38923; same tests as main.

@yan-3005
yan-3005 merged commit 1f6c471 into 2.1 Nov 27, 2026
47 checks passed
@yan-3005
yan-3005 deleted the backport/2.1/pr-38923 branch November 27, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants