Skip to content
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

Merged
merged 2 commits into from
Oct 27, 2020

Conversation

jmelot
Copy link
Contributor

@jmelot jmelot commented Oct 25, 2020

closes: #11040
related: #8765

Thanks for reviewing and please let me know if I need to go about this a different way!

@boring-cyborg
Copy link

boring-cyborg bot commented Oct 25, 2020

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)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, pylint and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@turbaszek turbaszek added the area:upgrade Facilitating migration to a newer version of Airflow label Oct 25, 2020
Comment on lines 59 to 60
assert isinstance(rule.description, str)
assert isinstance(rule.title, str)
Copy link
Member

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? 😉

Copy link
Contributor Author

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')",
Copy link
Member

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(..)?

Copy link
Contributor Author

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!

@turbaszek turbaszek merged commit 6b7588f into apache:v1-10-stable Oct 27, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented Oct 27, 2020

Awesome work, congrats on your first merged pull request!

@potiuk potiuk added this to the Airflow 1.10.13 milestone Nov 14, 2020
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
…2.0 (apache#11839)

* Adding ChainBetwenDAGAndOperatorNotAllowedRule for checking upgrade to Airflow 2.0 (apache#11040)

* Cleaning up tests for apache#11839
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:upgrade Facilitating migration to a newer version of Airflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants