Hi everyone, I'd like to start a discussion on how we decide to submit Airflow-specific rules to Ruff in the future.
## What we have now We already have migration rules in place, and this direction was proposed by TP quite some time ago. In general, these changes have not required much debate because they address cases where behavior no longer works in Airflow 3. While working on the migration, we established a soft convention for rule numbering: **AIR xyz**[1] — where "x" indicates the minimum supported Airflow major version (e.g., AIR001 should be applied to all Airflow versions while AIR301 works for Airflow 3.0+), "y" means you should do it in "y-1" minor version since these things will be deprecated since minor version "y" and will be removed in future version (most likely in the next major release, but change it as early as possible). (e.g., AIR321 are things changed in Airflow 3.1.* but still have backward compatibility) ## Why this is brought up now Illya (Dev-iL) recently opened 4 PRs: (Illya even has SKILLS for that!) - https://github.com/astral-sh/ruff/pull/23584 - https://github.com/astral-sh/ruff/pull/23631 - https://github.com/astral-sh/ruff/pull/23579 - https://github.com/astral-sh/ruff/pull/23583 The first 2 seem relatively uncontroversial: - One is already listed in Airflow best practices. - One reflects a rule that has already been merged into the Airflow 3 main branch. The latter 2 are best practices. Although we have discussed this in https://github.com/apache/airflow/issues/43176, I believe we should have a more formal discussion on the dev list. ## My proposal For future additions of this type of rule, one possible process could be: 1. Start a discussion (or Lazy Consensus) on the dev list. If consensus is reached, proceed. 2. Add the rule to the Airflow best practices documentation; at this point, Ruff rule development can proceed in parallel. 3. Once merged, update the Ruff rules to the relevant documentation accordingly. Feedback and alternative suggestions are very welcome. If everything sounds good, I'll start new threads for those existing PRs. Thanks! [1] https://docs.astral.sh/ruff/rules/#airflow-air --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
