Move lineage from airflow core to task sdk#61157
Merged
amoghrajesh merged 3 commits intoapache:mainfrom Jan 28, 2026
Merged
Conversation
potiuk
approved these changes
Jan 28, 2026
shreyas-dev
pushed a commit
to shreyas-dev/airflow
that referenced
this pull request
Jan 29, 2026
shashbha14
pushed a commit
to shashbha14/airflow
that referenced
this pull request
Feb 2, 2026
jason810496
pushed a commit
to abhijeets25012-tech/airflow
that referenced
this pull request
Feb 3, 2026
jhgoebbert
pushed a commit
to jhgoebbert/airflow_Owen-CH-Leung
that referenced
this pull request
Feb 8, 2026
Contributor
Author
|
cc: @atul-astronomer we can test out if using lineage works fine from new path |
81 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reattempting: #60968 after it was reverted due to failing tests in https://github.com/apache/airflow/actions/runs/21411369808/job/61650388211
The second commit makes the changes needed to fix the issues that lead to failures.
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:
