Skip to content
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

Airflow 3: python operators deprecations removal #41493

Closed

Conversation

dirrao
Copy link
Contributor

@dirrao dirrao commented Aug 15, 2024

Airflow 3: python operators deprecations removal

@boring-cyborg boring-cyborg bot added the area:core-operators Operators, Sensors and hooks within Core Airflow label Aug 15, 2024
@dirrao dirrao added airflow3.0:candidate Potential candidates for Airflow 3.0 airflow3.0:breaking Candidates for Airflow 3.0 that contain breaking changes labels Aug 15, 2024
@dirrao dirrao requested review from eladkal, potiuk and uranusjr August 15, 2024 06:07
Copy link
Contributor

@eladkal eladkal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to wait with breaking changes to core operators/sensors

See
https://lists.apache.org/thread/2dmlqkcmyomm4q7rrovygs6bw655zx07

@dirrao
Copy link
Contributor Author

dirrao commented Aug 15, 2024

We need to wait with breaking changes to core operators/sensors

See https://lists.apache.org/thread/2dmlqkcmyomm4q7rrovygs6bw655zx07

Are we planning to introduce new provider in Airflow 3?

@jscheffl
Copy link
Contributor

We need to wait with breaking changes to core operators/sensors
See https://lists.apache.org/thread/2dmlqkcmyomm4q7rrovygs6bw655zx07

Are we planning to introduce new provider in Airflow 3?

But... @eladkal we shoudl "clean-up" before carrying the legacy to new operators.. or? In my eyes we shoudl not carry-over deprecations.

@jscheffl
Copy link
Contributor

Newsfragment is missing though :-D Please add...

@dirrao
Copy link
Contributor Author

dirrao commented Aug 26, 2024

Newsfragment is missing though :-D Please add...

Added the news fragment for this change.

@eladkal
Copy link
Contributor

eladkal commented Aug 26, 2024

If we move the operator to providers there is no need for newsfragment. The breaking change will be in providers not in core.

@@ -0,0 +1 @@
Removed deprecated method ``task`` from ``airflow.operators.python`` operator. Please use ``python_task`` from ``airflow.decorators.python`` instead.
Copy link
Contributor

@eladkal eladkal Aug 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newsfragment will be about removing all the classses in the file.
This specific removal you are referring to will be in provider breaking change

Copy link
Member

@potiuk potiuk Aug 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we will have to keep it in newsfragments, so far those were "core" operators - and we have not moved them to "provider.standard" yet - and as I understand that, the standard provider will be part of the Airflow 3 migration (we will not remove old Python operators from Airflow 2 - we will add deprecation there) so the newsfragment should be still in Airflow - I think.

@uranusjr uranusjr removed their request for review August 26, 2024 10:56
@jscheffl
Copy link
Contributor

I see two other deprecations in python.py - can you also remove these in the scope of the PR?

@dirrao
Copy link
Contributor Author

dirrao commented Aug 28, 2024

Newsfragment is missing though :-D Please add...

I have added the news fragment.

@dirrao
Copy link
Contributor Author

dirrao commented Aug 28, 2024

I see two other deprecations in python.py - can you also remove these in the scope of the PR?

Serialization code refactoring changes added recently (may be 2.10). Does it make sense to remove them immediately?

@jscheffl
Copy link
Contributor

I see two other deprecations in python.py - can you also remove these in the scope of the PR?

Serialization code refactoring changes added recently (may be 2.10). Does it make sense to remove them immediately?

Deprecated is deprecated I'd say. It is by warning announced to be gone. Even if it is just announced in 2.10, this means 6+ months of notice before release. As well if we not remove in 3.0, then we would need to carry until 4.0

@dirrao
Copy link
Contributor Author

dirrao commented Aug 30, 2024

I see two other deprecations in python.py - can you also remove these in the scope of the PR?

Serialization code refactoring changes added recently (may be 2.10). Does it make sense to remove them immediately?

Deprecated is deprecated I'd say. It is by warning announced to be gone. Even if it is just announced in 2.10, this means 6+ months of notice before release. As well if we not remove in 3.0, then we would need to carry until 4.0

Yes. However, I want to reconfirm once before making the changes.
@eladkal / @potiuk WDYT?

@potiuk
Copy link
Member

potiuk commented Sep 1, 2024

I think we need to wait for next dev call where we discuss "standard" provider's scope

@potiuk potiuk requested a review from eladkal September 5, 2024 17:08
@potiuk potiuk force-pushed the python_operator_deprecations_removal branch from 39a6e45 to 168bdcf Compare September 11, 2024 22:44
@dirrao
Copy link
Contributor Author

dirrao commented Oct 9, 2024

I think we need to wait for next dev call where we discuss "standard" provider's scope

Any update on this?

@dirrao dirrao self-assigned this Oct 10, 2024
@dirrao
Copy link
Contributor Author

dirrao commented Oct 10, 2024

@potiuk / @eladkal
are we good to merge this PR?

@potiuk
Copy link
Member

potiuk commented Oct 13, 2024

@potiuk / @eladkal are we good to merge this PR?

No - not really - there is another change in progress - #42081 that moves Python operators to "standard" providers, and I think what you did here should be done as part of it, rather than separate PR from you - so I think the best course of action is to close that one and get you @dirrao to review and make comment in the #42081 so that we make sure deprecations are removed in the standard provider.

This should be generally done in the same way for all operators that are part of the "core" - we should move all of them to " "standard" and remove the deprecation "along the way".

cc: @gopidesupavan.

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Nov 28, 2024
@github-actions github-actions bot closed this Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
airflow3.0:breaking Candidates for Airflow 3.0 that contain breaking changes airflow3.0:candidate Potential candidates for Airflow 3.0 area:core-operators Operators, Sensors and hooks within Core Airflow stale Stale PRs per the .github/workflows/stale.yml policy file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants