[airflow]: extend removed method calls (AIR302)#15054
Merged
MichaReiser merged 2 commits intoastral-sh:mainfrom Dec 20, 2024
Merged
[airflow]: extend removed method calls (AIR302)#15054MichaReiser merged 2 commits intoastral-sh:mainfrom
MichaReiser merged 2 commits intoastral-sh:mainfrom
Conversation
* `airflow.datasets.manager.DatasetManager.register_dataset_change` → `airflow.assets.manager.AssetManager.register_asset_change` * `airflow.datasets.manager.DatasetManager.create_datasets` → `airflow.assets.manager.AssetManager.create_assets` * `airflow.datasets.manager.DatasetManager.notify_dataset_created` → `airflow.assets.manager.AssetManager.notify_asset_created` * `airflow.datasets.manager.DatasetManager.notify_dataset_changed` → `airflow.assets.manager.AssetManager.notify_asset_changed` * `airflow.datasets.manager.DatasetManager.notify_dataset_alias_created` → `airflow.assets.manager.AssetManager.notify_asset_alias_created` * `airflow.providers.amazon.auth_manager.aws_auth_manager.AwsAuthManager.is_authorized_dataset` → `airflow.providers.amazon.auth_manager.aws_auth_manager.AwsAuthManager.is_authorized_asset` * `airflow.lineage.hook.HookLineageCollector.create_dataset` → `airflow.lineage.hook.HookLineageCollector.create_asset` * `airflow.lineage.hook.HookLineageCollector.add_input_dataset` → `airflow.lineage.hook.HookLineageCollector.add_input_asset` * `airflow.lineage.hook.HookLineageCollector.add_output_dataset` → `airflow.lineage.hook.HookLineageCollector.dd_output_asset` * `airflow.lineage.hook.HookLineageCollector.collected_datasets` → `airflow.lineage.hook.HookLineageCollector.collected_assets` * `airflow.providers_manager.ProvidersManager.initialize_providers_dataset_uri_resources` → `airflow.providers_manager.ProvidersManager.initialize_providers_asset_uri_resources`
Contributor
|
MichaReiser
reviewed
Dec 19, 2024
| removed_argument(checker, &qualname, arguments); | ||
| }; | ||
|
|
||
| removed_method(checker, func); |
Member
There was a problem hiding this comment.
Can we skip calling removed_method if the resolved_qualified_name call was successful or does it need both?
Contributor
Author
There was a problem hiding this comment.
I think both are needed.
Contributor
Author
There was a problem hiding this comment.
e.g.,
from airflow.datasets.manager import DatasetManager
d = DatasetManager()
d.register_dataset_change()needs 2 warnings
- import error
- method call error
Lee-W
commented
Dec 19, 2024
Lee-W
commented
Dec 19, 2024
MichaReiser
added a commit
that referenced
this pull request
Dec 20, 2024
## Summary Smaller nits follow up to #15054 because I wasn't able to push to the branch directly. ## Test Plan `cargo test`
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.
Summary
Airflow 3.0 removes various deprecated functions, members, modules, and other values. They have been deprecated in 2.x, but the removal causes incompatibilities that we want to detect. This PR deprecates the following names and add a function for removed methods
airflow.datasets.manager.DatasetManager.register_dataset_change→airflow.assets.manager.AssetManager.register_asset_changeairflow.datasets.manager.DatasetManager.create_datasets→airflow.assets.manager.AssetManager.create_assetsairflow.datasets.manager.DatasetManager.notify_dataset_created→airflow.assets.manager.AssetManager.notify_asset_createdairflow.datasets.manager.DatasetManager.notify_dataset_changed→airflow.assets.manager.AssetManager.notify_asset_changedairflow.datasets.manager.DatasetManager.notify_dataset_alias_created→airflow.assets.manager.AssetManager.notify_asset_alias_createdairflow.providers.amazon.auth_manager.aws_auth_manager.AwsAuthManager.is_authorized_dataset→airflow.providers.amazon.auth_manager.aws_auth_manager.AwsAuthManager.is_authorized_assetairflow.lineage.hook.HookLineageCollector.create_dataset→airflow.lineage.hook.HookLineageCollector.create_assetairflow.lineage.hook.HookLineageCollector.add_input_dataset→airflow.lineage.hook.HookLineageCollector.add_input_assetairflow.lineage.hook.HookLineageCollector.add_output_dataset→airflow.lineage.hook.HookLineageCollector.dd_output_assetairflow.lineage.hook.HookLineageCollector.collected_datasets→airflow.lineage.hook.HookLineageCollector.collected_assetsairflow.providers_manager.ProvidersManager.initialize_providers_dataset_uri_resources→airflow.providers_manager.ProvidersManager.initialize_providers_asset_uri_resourcesTest Plan
A test fixture is included in the PR.