-
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
Adding ChainBetwenDAGAndOperatorNotAllowedRule for easing upgrade to 2.0 #11839
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
|
assert isinstance(rule.description, str) | ||
assert isinstance(rule.title, str) |
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 adding separate test for this instead of duplicating this in every test? 😉
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.
Thanks, sorry about the copypasta. Pushed a fix!
assert 0 == len(msgs) | ||
|
||
def test_invalid_check(self, mock_list_files): | ||
lines = ["dag = DAG('my_dag')", |
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.
Will it work if users do dag1 = DAG(..)
?
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.
Yep, updated this test to demonstrate!
Awesome work, congrats on your first merged pull request! |
…2.0 (apache#11839) * Adding ChainBetwenDAGAndOperatorNotAllowedRule for checking upgrade to Airflow 2.0 (apache#11040) * Cleaning up tests for apache#11839
closes: #11040
related: #8765
Thanks for reviewing and please let me know if I need to go about this a different way!