fix(providers/common/compat): add back add_input_dataset and add_output_dataset to NoOpCollector - #44681
Merged
Lee-W merged 2 commits intoDec 5, 2024
Conversation
phanikumv
reviewed
Dec 5, 2024
…ut_dataset to NoOpCollector
Lee-W
force-pushed
the
fix-common-provider-asset-rename-support
branch
2 times, most recently
from
December 5, 2024 07:46
3b2ea34 to
71448f5
Compare
…et_methods and test_compat_has_asset_and_dataset_methods
Lee-W
force-pushed
the
fix-common-provider-asset-rename-support
branch
from
December 5, 2024 08:12
71448f5 to
71f3757
Compare
Lee-W
marked this pull request as ready for review
December 5, 2024 08:14
phanikumv
approved these changes
Dec 5, 2024
got686-yandex
pushed a commit
to got686-yandex/airflow
that referenced
this pull request
Jan 30, 2025
…ut_dataset to NoOpCollector (apache#44681) * fix(providers/common/compat): add back add_input_dataset and add_output_dataset to NoOpCollector * test(providers/common/compat): add test case test_compat_has_only_asset_methods and test_compat_has_asset_and_dataset_methods
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.
Why
When the user has airflow < 2.10 installed, a provider that has not yet renamed datasets as assets (e.g.,
apache-airflow-providers-amazon==8.28.0) andapache-airflow-providers-common-compat>=1.2.1(with asset rename backward compatibility layer.), the user will get the followinghook_lineage_collectorafter callingget_hook_lineage_collector.As the provider has not yet been updated to use asset methods, it is still called
add_input_dataset, which causes an AttributeError asadd_input_datasetdoes not exist in the returnedNoOpCollectorWhat
add back
add_input_datasetandadd_output_datasetfor backward compat^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.