Repository navigation
Fixes 38297: Route suggestions on unowned assets through every owner to the admins - #38307
Conversation
…ead of widening the rule
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findingsUpdating and redeploying SuggestionTaskWorkflow adds owner/admin fallback, so unowned-asset suggestions may reach broader groups and increase their task load. Routes suggestion tasks on unowned assets through service owners, then domain owners, then admins (excluding the requester), via a new opt-in ✅ 1 closed✅ Quality: Guard now lets any checked step call exceptions, contrary to ADR item 3
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
… owner to the admins (backport 2.1 #38307, #38475) (#38560) * Fixes 38297: Route suggestions on unowned assets through every owner to the admins (#38307) * feat(governance): let an approval task fall back to service and domain owners * feat(governance): route unowned suggestion tasks through every owner to the admins * test(governance): suggestion tasks reach service owners, then admins * fix(governance): look past owners who are the requester in the owner cascade * fix(governance): drop an unworkable remedy from the v211 migration error * test(migrations): list the 2.1.1 Migration classes as exceptions instead of widening the rule (cherry picked from commit b19c2d2) * Fixes 38297: Move the 2.1.1 migration's workflow redeploy to server start (#38475) * fix(governance): deploy changed workflows on server start, not in migrations * fix(governance): build the same workflow BPMN in every JVM * docs(decisions): note the one extra deploy after a save that reorders map keys * fix(governance): skip an unreadable workflow instead of deploying none on start * fix(governance): name the workflow skipped as unreadable * fix(governance): log the skipped workflow by its name (cherry picked from commit 3cdf00c) * docs: drop references to the migration architecture test, absent on 2.1
Describe your changes:
Fixes #38297
A suggestion task on an asset with no owner was created with no assignee and reached nobody. A new opt-in assignee option,
cascadeOwners, makes an approval task fall back to the asset's service owners, then its domain owners, beforeemptyAssigneeStrategyruns.SuggestionTaskWorkflowturns it on together withassignAdmins, so a suggestion nobody owns goes to the admins except its requester. A 2.1.1 migration applies the same settings to the stored workflow and redeploys it.Type of change:
High-level design:
SetApprovalAssigneesImpl, newOwnerCascade): task assignees, then reviewers or owners (own and inherited), then, only whencascadeOwnersis on and nothing resolved, service owners, then domain owners, thenemptyAssigneeStrategy. A step is empty when it yields no user after team expansion. Owner auto-assignment turned off for the workflow skips the cascade too.cascadeOwners(boolean, no default) onuserApprovalTask.config.assignees;UserApprovalTask.transformAssigneesForFlowablepasses it into the BPMN. Other workflows are unchanged unless a node sets it.SuggestionTaskWorkflowTaskReviewsetscascadeOwners: trueandemptyAssigneeStrategy: assignAdmins.SuggestionTaskOwnerFallbackMigration): seeding never updates a stored workflow, and the deployed BPMN keeps the old assignee config until redeployed. The step edits the row as JSON (setscascadeOwners; replaces a missing ornonestrategy withassignAdmins, keepswaitandassignAdmins), then redeploys. A stored workflow without aTaskReviewnode with assignees fails the migration, as ADR:2026-11-11-a-data-migration-carries-its-own-logic asks of an exception.Invalid field name domains.v211/Migration.javaand 2.1.1 SQL. Whichever merges second keeps bothrunOncecalls and the other PR's SQL.docs/decisions/2026-11-20-suggestion-tasks-fall-back-through-every-owner-to-the-admins.md.TaskAssigneeCleanup.removeAssigneerewrites the tasks assigned to it, and a suggestion resolved in that sub-second window gets a 412 fromTaskRepository.resolveTask.GlossaryTermAutomationDraftIT.anAutomationTermWithoutReviewersOrOwnersGoesToTheAdminshas the same exposure onmain; this widens it to suggestion tests. The new IT creates no admin.Tests:
Use cases covered
mainfor every task type (TaskRepository.setDefaultAssigneesFromEntityOwners, kept byCreateTask.resolveExistingTaskAssignees).cascadeOwnersoff skip the cascade.nonestrategy, keepswait, is left alone when up to date, and fails whenTaskReviewis missing.Unit tests
SetApprovalAssigneesImplTest: 7 new cases.SuggestionTaskOwnerFallbackMigrationTest: new, 4 cases (5 runs).MigrationArchitectureTest: the step and the two 2.1.1Migrationclasses listed as exceptions.Backend integration tests
WorkflowTaskAssigneesIT:aSuggestionOnAnUnownedTableGoesToItsServiceOwner,aSuggestionWithNoOwnerAnywhereGoesToTheAdmins(both time out onmain; the first also fails without thetransformAssigneesForFlowableline).Local Java test run: PASSED
c807899b60a1(baseorigin/main).dbf2df7208eafter it changes onlyMigrationArchitectureTest(2/2 passed) and the decision record.Migration; those were not run.The 80 skipped are
BaseEntityIT$ListEntityHistoryByTimestampPaginationTest, which skips itself on this engine.Ingestion integration tests
Playwright (UI) tests
Manual testing performed
Local Collate on Postgres,
openmetadata_dbat 2.1.0, backed up first.Openat stagereviewwith none.TaskReviewgainedcascadeOwners: trueandassignAdmins, FlowableSuggestionTaskWorkflowwent from version 9 to 10, and the step marker was recorded.GET /v1/tasks/assigned.workflow_definition_entityDDL, on the pre-2.1.1 row: a soft-deleted row is not selected; the live row is updated once, its generated columns intact, to JSON identical to the Postgres result. The redeploy is engine-independent and was verified on Postgres.UI screen recording:
Not applicable: backend-only change.
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes <issue-number>: <short explanation>My PR is linked to a GitHub issue via
Fixes #<issue-number>above.I have commented on my code, particularly in hard-to-understand areas.
For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
For a UI feature or feature task: not applicable, backend-only.
I have added tests (unit / integration / Playwright as applicable) and listed them above.
Self-review: I reviewed the final diff against
REVIEW.mdand fixed every 🔴 finding, or answered it on the line below.dbf2df7208e: no 🔴. Answered, not changed:mainfor every task type, out of scope here.TaskReviewis missing, as ADR:2026-11-11-a-data-migration-carries-its-own-logic asks of an exception;REVIEW.mdwould rather leave a customized row alone.MigrationArchitectureTest: the rule is unchanged; the step and the two 2.1.1Migrationclasses that run it are listed as exceptions.Decision check: adds
docs/decisions/2026-11-20-suggestion-tasks-fall-back-through-every-owner-to-the-admins.md.I have added a test that covers the exact scenario we are fixing.


Confidence Score: 5/5
The PR appears safe to merge; no new blocking issue was found.Summary
Adds optional owner fallback for approval tasks and enables it for suggestions: service owners, then domain owners, then admins. The 2.1.1 migration updates and redeploys the stored workflow.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Existing task assignees] --> B{Anyone assigned?} B -->|Yes| C[Keep existing assignment path] B -->|No| D[Resolve configured reviewers and owners] D --> E{Eligible user found?} E -->|Yes| F[Assign task] E -->|No, cascade enabled| G[Service owners] G --> H{Eligible user found?} H -->|Yes| F H -->|No| I[Domain owners] I --> J[Apply empty-assignee strategy if needed] J --> K[Suggestions fall back to admins]Reviews (2) · Last reviewed commit: "test(migrations): list the 2.1.1 Migrati..." · Reviewed by Greptile