-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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] Avoid deprecated values (AIR302) #14582
Conversation
111ee16
to
b3642c3
Compare
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
AIR302 | 1 | 1 | 0 | 0 | 0 |
AIR301 | 1 | 0 | 1 | 0 | 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Thank you. I've two small questions/suggestions.
crates/ruff_linter/src/rules/airflow/rules/deprecated_members.rs
Outdated
Show resolved
Hide resolved
crates/ruff_linter/src/rules/airflow/rules/deprecated_members.rs
Outdated
Show resolved
Hide resolved
Feel free to ping me when you rebased the PR and I'll merge it. This is great work. |
4843c41
to
1f5ec14
Compare
Alright, I’ve added argument deprecation to AIR302. I also added some structure in the module since we’re probably going to add other kinds of deprecation (like |
87f000b
to
352feb4
Compare
6baabb0
to
b9fe68c
Compare
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.
When a deprecated schedule argument is found on a DAG, it is more appropriate to emit an AIR302 to signify a rename, instead of telling the user to add a 'schedule' argument (which won't work unless they also remove the deprecated argument).
b9fe68c
to
3f381e6
Compare
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.
(We are deprecating a lot more things. I want to use this to establish a basic structure so future checks can be submitted more easily.)
Ref: #14626
Test Plan
A test fixture is included in the PR.