Skip to content

[Fix-18792][Tools] Preserve workflow and task ownership in lineage migration - #18793

Open
llphxd wants to merge 1 commit into
apache:devfrom
llphxd:Fix-18792-migrate-lineage-ownership
Open

llphxd wants to merge 1 commit into
apache:devfrom
llphxd:Fix-18792-migrate-lineage-ownership

Conversation

@llphxd

@llphxd llphxd commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Was this PR generated or assisted by AI?

Yes. AI helped implement the fix and write the regression tests.

Purpose of the pull request

Fixes #18792.

Generate each lineage record with the workflow and task that owns it. Previously, processing a later DEPENDENT task could overwrite the workflow code and version of records already generated for other tasks, while the owning task code and version were left at zero.

Brief change log

  • Match the workflow relation once per task and set the owning workflow and task codes and versions when creating each lineage record.
  • Skip tasks without a matching workflow relation so the migration does not insert records with a zero workflow code.
  • Add regression tests for dependencies owned by different workflows and for tasks without a workflow relation.

Verify this pull request

  • Both regression tests fail on the original dev code and pass with this change.
  • Ran 11 tests successfully across MigrateLineageServiceTest, SchemaUtilsTest, WorkflowTaskLineageMapperTest, and WorkflowTaskRelationMapperTest. The DAO tests use H2.
  • Ran ./mvnw spotless:apply and passed the Spotless checks during the test build.

Pull Request Notice

Pull Request Notice

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [Tools] MigrateLineage assigns dependencies to the wrong workflow

1 participant