-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Add possibility to configure upgrade_check command #12657
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
Add possibility to configure upgrade_check command #12657
Conversation
8a05beb to
5e9d418
Compare
|
The PR needs to run all tests because it modifies core of Airflow! Please rebase it to latest master or ask committer to re-run it! |
5e9d418 to
298ff1d
Compare
potiuk
left a comment
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.
NICE
airflow/upgrade/checker.py
Outdated
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.
You're going to have to explain why this line is here.
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.
And if f47efe9#diff-62e7779cba210540c1bb87f26ce56a6176941d024635c606bcf360c14b4a9e12 isn't needed anymore as a result then you should remove it
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.
You're going to have to explain why this line is here.
@ashb should I add comment in code?
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.
Please
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.
Setting disable to ERROR will suppress the dagbag errors so I removed the logic from undefined jinja rule
airflow/upgrade/checker.py
Outdated
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.
How about you make remove_ignored_rules a function in here, and then it can be used for both args.ignore and the value from the config file.
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.
Refactored the logic a little bit, let me know what you think
In some cases users may want to suppress some checks. This commit adds possibility to specify simple yaml file where users can specify ignored checks and module path to custom checks.
7240edf to
2720e19
Compare
|
It seems that |
* Add possibility to configure upgrade_check command In some cases users may want to suppress some checks. This commit adds possibility to specify simple yaml file where users can specify ignored checks and module path to custom checks. * Mark TestUndefinedJinjaVariablesRule::test_invalid_check as quarantined
In some cases users may want to suppress some checks. This commit
adds possibility to specify simple yaml file where users can
specify ignored checks and module path to custom checks.
I also disable logging to avoid output between lines of check.
Before:
After:
And using custom rules:
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.