-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Move lineage from airflow core to task sdk #60968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
amoghrajesh
wants to merge
15
commits into
apache:main
Choose a base branch
from
astronomer:lineage-to-sdk
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+105
−72
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mobuchowski
approved these changes
Jan 23, 2026
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks good to me, thanks @amoghrajesh!
Couple of tests to fix though.
uranusjr
reviewed
Jan 23, 2026
Comment on lines
+24
to
+25
| from airflow.sdk import BaseHook, plugins_manager | ||
| from airflow.sdk.definitions.asset import Asset |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
| from airflow.sdk import BaseHook, plugins_manager | |
| from airflow.sdk.definitions.asset import Asset | |
| from airflow.sdk import Asset, BaseHook, plugins_manager |
uranusjr
approved these changes
Jan 23, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area:dev-tools
area:lineage
area:plugins
area:providers
area:task-sdk
backport-to-v3-1-test
Mark PR with this label to backport to v3-1-test branch
full tests needed
We need to run full set of tests for this PR to merge
provider:common-compat
provider:openlineage
AIP-53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Was generative AI tooling used to co-author this PR?
Why?
Lineage collection is a task execution concern and on checking it only runs on workers (task sdk consumer) processes, not in any server components (scheduler, api server). I intend to move lineage module from airflow-core to task-sdk as part of the ongoing client server separation work.
Some more context:
io/path.pyintercepts file I/O during task executionWhat is done?
sdk/lineage.pyairflow.lineage.hookProvidersManager→ProvidersManagerTaskRuntimeairflow.utils.log.logging_mixin→airflow.sdk.definitions._internal.logging_mixinget_hook_lineage_readers_plugins()using SDK's plugin discoveryBackward Compatibility
For core -
from airflow.lineage.hook import Xandfrom airflow.lineage import hookProvider compatibility has been handled with
providers/common/compat/src/airflow/providers/common/compat/sdk.pyDatasetLineageInfo→AssetLineageInforename (AF2 → AF3)Removed from core -
airflow-core/src/airflow/plugins_manager.pyget_hook_lineage_readers_plugins()functionFor provider developers, it is recommended to use imports from
airflow.providers.common.compat.sdkTesting
To gain confidence I tried to test a manual e2e scenario for this. Ran breeze with OL integration:
breeze start-airflow --integration openlineageDAG:
Its a simple dag that does this:
file:///input/data.csvfile:///output/result.csvget_hook_lineage_collector()to register assetsDAG run:

Marquez:
