Repository navigation
fix(migrations): v201 AutoPilotWorkflow BPMN redeploy + task supersede fallback - #32156
Conversation
- v201 (2.0.1) native migration re-deploys every workflow definition so the Flowable BPMN is regenerated against current delegate classes. Fixes the AutoPilotWorkflow "non-existent field pipelineServiceClientExpr" injection failure observed after upgrade (delegate field removed in #28741). - CreateTask.isSupersedablePriorApprovalTask now resolves the prior task's workflowDefinitionId from its workflow instance when the task itself carries none. Migrated tasks from the pre-2.0 thread model were wired to a workflowInstanceId but never stamped with a workflowDefinitionId, which made the supersede match fail and left duplicate approval tasks on re-edit.
…y-and-task-defid-nofw
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
… existing pattern
Code Review ✅ Approved 1 resolved / 1 findingsAdds a v201 Java migration to redeploy AutoPilotWorkflow and resolve missing task ✅ 1 resolved✅ Quality: SQL migration comment overstates redeploy scope
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
✅ Playwright Results — workflow succeededValidated commit ✅ 581 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 52m 5s ⏱️ Max setup 4m 7s · max shard execution 17m 38s · max shard-job elapsed before upload 21m 2s · reporting 4s 🌐 214.37 requests/attempt · 2.80 app boots/UI scenario · 25.52% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
🚦 Removed from the merge queue —
|
|
Failed to cherry-pick changes to the 1.13 branch. |
|
Failed to cherry-pick changes to the 2.0 branch. |
…persede fallback (#32162) Backport of #32156. - v201 (2.0.1) Java migration re-deploys AutoPilotWorkflow so its Flowable process definition is regenerated from the current delegate class. Fixes the "non-existent field 'pipelineServiceClientExpr'" injection failure after upgrading past #28741. - Defensive fallback in CreateTask.isSupersedablePriorApprovalTask: when the prior task carries a workflowInstanceId but no workflowDefinitionId, resolve the definition id from the instance before the equality check. One lazy read per null case; no bulk backfill.
Summary
Two focused changes, one PR:
1. AutoPilotWorkflow BPMN redeploy (v201)
#28741 removed
pipelineServiceClientExprfromCreateIngestionPipelineDelegate, but the BPMN deployed by earlier releases still declares that field. On upgrade to a build that carries #28741, every AutoPilotWorkflow run fails at Flowable field injection with:A new v201 (2.0.1) Java migration re-deploys AutoPilotWorkflow so its Flowable process definition is regenerated from the current delegate class, restoring runtime execution.
2. Task supersede fallback (defensive only)
CreateTask.isSupersedablePriorApprovalTaskcomparescurrentWorkflowDefinitionId.equals(prior.getWorkflowDefinitionId()). When the prior task carries aworkflowInstanceIdbut noworkflowDefinitionId, the equality check runs againstnulland supersede silently no-ops, leaving stranded Flowable process instances and duplicate approval tasks on the same entity.This PR adds a defensive fallback only: when the prior task's
workflowDefinitionIdis missing, resolve it from itsworkflowInstancebefore the equality check. One lazy indexed read per null case; no bulk backfill, no writes to task rows.Test plan
MigrationProcessImplTest,MigrationWorkflowTest,CreateTaskTest(2 new fallback tests) all green.pipelineServiceClientExprfield-injection error; a prior task with a missingworkflowDefinitionIdis now correctly superseded on the next edit and its Flowable instance terminates.Greptile Summary
This PR adds a v201 migration to redeploy AutoPilotWorkflow with the current delegate contract and adds a fallback for resolving missing task workflow-definition IDs.
Confidence Score: 4/5
The PR is not yet safe to merge because a failed AutoPilot redeployment can still be permanently recorded as a successful v201 migration.
The migration continues to catch workflow initialization, repository lookup, and Flowable deployment failures without propagating them, so the migration framework can persist successful completion even though the stale AutoPilot BPMN remains and will not receive a targeted retry.
Files Needing Attention: openmetadata-service/src/main/java/org/openmetadata/service/migration/utils/v201/MigrationUtil.java, openmetadata-service/src/main/java/org/openmetadata/service/migration/mysql/v201/Migration.java, openmetadata-service/src/main/java/org/openmetadata/service/migration/postgres/v201/Migration.java
Important Files Changed
Reviews (2): Last reviewed commit: "chore(migrations): empty 2.0.1 SQL stubs..." | Re-trigger Greptile