Skip to content

Conversation

@prabhusneha
Copy link
Contributor

Summary

Add "airflow.secrets.cache.SecretCache" → "airflow.sdk.cache.SecretCache" rule

Test Plan

@prabhusneha
Copy link
Contributor Author

cc: @Lee-W

@prabhusneha prabhusneha marked this pull request as ready for review April 30, 2025 05:46
@MichaReiser MichaReiser added rule Implementing or modifying a lint rule preview Related to preview mode features labels Apr 30, 2025
@MichaReiser MichaReiser requested a review from ntBre April 30, 2025 06:25
@github-actions
Copy link
Contributor

github-actions bot commented Apr 30, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Contributor

@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.

This is not in Airflow 3.0.0 but is expected to be released in 3.0.1. @ntBre is there any suggestion on this case? Should we create a new error? Thanks!

@ntBre
Copy link
Contributor

ntBre commented Apr 30, 2025

I think if you want people to be able to enable this separately from the other 3.0 rules, a separate rule would be required. Alternatively, we could hold off on adding this until 3.0.1 is released, if that would work for you all.

Which part is not in 3.0.0? If the replacement is available but the old version isn't deleted, I think it could make sense just to enable the rule anyway, but that obviously wouldn't make sense if the replacement is only added in 3.0.1.

I'll go ahead and review but hold off merging in case you want a separate rule.

@dhruvmanila
Copy link
Member

I think I'd prefer to keep it in the same rule, you could update the diagnostic message for the existing rules to make it explicit that this "requires Airflow 3.0 or greater". It also seems to be something that's part of a patch version in Airflow so I'm assuming that it's backwards compatible and as Ruff can't detect the dependency version it makes sense that Ruff assumes that users are on the latest version of Airflow 3. I think it's the same for NumPy 2.0 deprecation rules if I'm not mistaken.

@Lee-W
Copy link
Contributor

Lee-W commented May 6, 2025

we could hold off on adding this until 3.0.1 is released,

Yep, I think we should hold off till 3.0.1

Which part is not in 3.0.0?

The replacement itself. It will be introduced in 3.0.1

you could update the diagnostic message for the existing rules to make it explicit that this "requires Airflow 3.0 or greater".

Yep, I was thinking of something similar. Cool! I'll go with this route after 3.0.1 release. Thanks!

@ntBre
Copy link
Contributor

ntBre commented May 6, 2025

I'll mark this as a draft until we're ready to merge, which sounds like after 3.0.1 is released. Feel free to ping me whenever it's ready!

@ntBre ntBre marked this pull request as draft May 6, 2025 13:11
@MichaReiser
Copy link
Member

@Lee-W what's the status on this rule? Can we close this PR?

@Lee-W
Copy link
Contributor

Lee-W commented Jul 18, 2025

Hey, sorry for the late reply. I'll take a look tomorrow

@Lee-W
Copy link
Contributor

Lee-W commented Jul 20, 2025

I think this is needed and I'll take over once I'm back from my vacaction

@MichaReiser
Copy link
Member

Enjoy your vacation

@Lee-W Lee-W force-pushed the add_AIR301_rule branch 2 times, most recently from 6121cb3 to 18bb40f Compare August 1, 2025 11:08
@Lee-W
Copy link
Contributor

Lee-W commented Aug 1, 2025

The PR is now ready, but I'm not allowed to change anything other than code somehow 🤔

@prabhusneha prabhusneha marked this pull request as ready for review August 1, 2025 11:15
Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

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

Still looks good to me, thank you! I think you'll just need to resolve the conflicts and then we can merge.

@ntBre ntBre merged commit 6bc52f2 into astral-sh:main Aug 11, 2025
35 checks passed
dcreager added a commit that referenced this pull request Aug 11, 2025
* main: (31 commits)
  Add AIR301 rule (#17707)
  Avoid underflow in default ranges before a BOM (#19839)
  Update actions/download-artifact digest to de96f46 (#19852)
  Update docker/login-action action to v3.5.0 (#19860)
  Update rui314/setup-mold digest to 7344740 (#19853)
  Update cargo-bins/cargo-binstall action to v1.14.4 (#19855)
  Update actions/cache action to v4.2.4 (#19854)
  Update Rust crate hashbrown to v0.15.5 (#19858)
  Update Rust crate camino to v1.1.11 (#19857)
  Update Rust crate proc-macro2 to v1.0.96 (#19859)
  Update dependency ruff to v0.12.8 (#19856)
  SIM905: Fix handling of U+001C..U+001F whitespace (#19849)
  RUF064: offer a safe fix for multi-digit zeros (#19847)
  Clean up unused rendering code in `ruff_linter` (#19832)
  [ty] Add Salsa caching to `TupleType::to_class_type` (#19840)
  [ty] Handle cycles when finding implicit attributes (#19833)
  [ty] fix goto-definition on imports (#19834)
  [ty] Implement stdlib stub mapping (#19529)
  [`flake8-comprehensions`] Fix false positive for `C420` with attribute, subscript, or slice assignment targets (#19513)
  [ty] Implement module-level `__getattr__` support (#19791)
  ...
dcreager added a commit that referenced this pull request Aug 11, 2025
* dcreager/bound-typevar: (41 commits)
  [ty] Use separate Rust types for bound and unbound type variables (#19796)
  fix ide tests
  better unbound typevar rendering
  Apply suggestions from code review
  [ty] Add `static-frame` as a walltime benchmark (#19844)
  add explanatory comment
  [ty] Update goto range for attribute access to only target the attribute (#19848)
  remove unneeded ord
  add TODO for broken hover test
  better PEP 695 binding context
  Add AIR301 rule (#17707)
  Avoid underflow in default ranges before a BOM (#19839)
  Update actions/download-artifact digest to de96f46 (#19852)
  Update docker/login-action action to v3.5.0 (#19860)
  Update rui314/setup-mold digest to 7344740 (#19853)
  Update cargo-bins/cargo-binstall action to v1.14.4 (#19855)
  Update actions/cache action to v4.2.4 (#19854)
  Update Rust crate hashbrown to v0.15.5 (#19858)
  Update Rust crate camino to v1.1.11 (#19857)
  Update Rust crate proc-macro2 to v1.0.96 (#19859)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Related to preview mode features rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants