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

refactor(utils/decorators): rewrite remove task decorator to use cst #43383

Merged
merged 10 commits into from
Feb 7, 2025

Conversation

josix
Copy link
Contributor

@josix josix commented Oct 25, 2024

due to #42766 the dropping of python3.8 support, I rewrite the remove_task_decorator to achieve the same purpose through CST.

TODO:

  • implementation
  • update unit tests

^ 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.rst or {issue_number}.significant.rst, in newsfragments.

@josix josix force-pushed the refactor/remove_task_decorator branch 2 times, most recently from 991cccc to 4e926d5 Compare October 25, 2024 16:02
@josix josix marked this pull request as ready for review October 25, 2024 16:14
@josix josix marked this pull request as draft October 25, 2024 16:18
@Lee-W Lee-W self-requested a review October 25, 2024 16:19
@josix josix force-pushed the refactor/remove_task_decorator branch 2 times, most recently from d5e6684 to 606b2ea Compare October 25, 2024 20:02
@josix josix force-pushed the refactor/remove_task_decorator branch from 1ec8a0a to 28d8f2c Compare October 26, 2024 03:45
@josix josix marked this pull request as ready for review October 26, 2024 05:09
@Lee-W Lee-W marked this pull request as draft November 26, 2024 07:13
Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

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

As we decide to use CST, just mark it as draft

@josix josix force-pushed the refactor/remove_task_decorator branch from 28d8f2c to 2a82c10 Compare December 16, 2024 16:58
@josix josix force-pushed the refactor/remove_task_decorator branch from 2a82c10 to f2cbefa Compare December 28, 2024 14:46
@josix josix force-pushed the refactor/remove_task_decorator branch 4 times, most recently from 292076c to 066d757 Compare January 27, 2025 07:28
@josix josix marked this pull request as ready for review January 27, 2025 08:22
@josix josix force-pushed the refactor/remove_task_decorator branch from 066d757 to 324301b Compare January 27, 2025 13:29
@josix
Copy link
Contributor Author

josix commented Jan 27, 2025

Hi @potiuk @Lee-W sorry for waiting for a period of time, I've updated to use libcst version to remove the task decorators. Please take a look when you are available, thanks!

@josix josix changed the title refactor(utils/decorators): rewrite remove task decorator to use ast refactor(utils/decorators): rewrite remove task decorator to use cst Jan 28, 2025
airflow/utils/decorators.py Outdated Show resolved Hide resolved
airflow/utils/decorators.py Outdated Show resolved Hide resolved
airflow/utils/decorators.py Outdated Show resolved Hide resolved
airflow/utils/decorators.py Outdated Show resolved Hide resolved
@josix josix requested a review from Lee-W February 4, 2025 02:45
@josix josix force-pushed the refactor/remove_task_decorator branch from 6631ea8 to bc09e4b Compare February 4, 2025 04:14
@josix josix requested a review from Lee-W February 4, 2025 12:34
Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

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

Nice work! left some nits. I'll keep this open for a few days so others can take a lot. if no one object, I'll merge it in 1 or 2 days

@potiuk potiuk force-pushed the refactor/remove_task_decorator branch from e7feec6 to 696e0ea Compare February 6, 2025 07:49
Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Approved with the few nits pointed out by @Lee-W. Looks cool. I also rebased it to take into account the failing @Retry operator -> has been introduced and fixed yesterday by the http_retry library author, so main should be fine already.

@josix josix force-pushed the refactor/remove_task_decorator branch from 6df6641 to 31868ea Compare February 6, 2025 19:11
@Lee-W Lee-W merged commit 9689cf5 into apache:main Feb 7, 2025
157 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants