-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Create ChainBetwenDAGAndOperatorNotAllowedRule to ease upgrade to Airflow 2.0 #11040
Comments
Hello, could I please take this one? |
@jmelot I assigned you to this ticket. |
Thanks, and sorry for taking so long to follow up. I implemented a rule for this that parses the text of the files in the dags folder and looks for bitshift operators being used on DAG instances. I keep wondering if I'm missing a better way to do this, though. Would you please take a quick look and see if this is on track, or if there is a different way of detecting this I should be looking at instead? |
@jmelot would you mind opening a PR? This will simplify the review :) Please, target the |
Closed via #11839 |
…2.0 (apache#11839) * Adding ChainBetwenDAGAndOperatorNotAllowedRule for checking upgrade to Airflow 2.0 (apache#11040) * Cleaning up tests for apache#11839
This issue is part of #8765
Rule
Create
ChainBetwenDAGAndOperatorNotAllowedRule
which corresponds toentry in UPDATING.md. This rule should allow users to check if their current configuration needs any adjusting
before migration to Airflow 2.0.
How to guide
To implement a new rule, create a class that inherits from
airflow.upgrade.rules.base_rule.BaseRule
.It will be auto-registered and used by
airflow upgrade-check
command. The custom rule class has to havetitle
,description
properties and should implementcheck
method which returns a list of error messages in case ofincompatibility.
For example:
airflow/airflow/upgrade/rules/conn_type_is_not_nullable.py
Lines 25 to 42 in ea36166
Remember to open the PR against
v1-10-stable
branch.The text was updated successfully, but these errors were encountered: