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

Add UniqueConnIdRule rule and unittest #11222

Merged
merged 2 commits into from
Oct 5, 2020

Conversation

edeNFed
Copy link

@edeNFed edeNFed commented Oct 1, 2020

Adds UniqueConnIdRule rule to upgrade/rules as per:

https://github.com/apache/airflow/blob/master/UPDATING.md#unique-conn_id-in-connection-table

Closes: #11037


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.

@boring-cyborg
Copy link

boring-cyborg bot commented Oct 1, 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

@dimberman dimberman self-requested a review October 1, 2020 19:08
@dimberman
Copy link
Contributor

@edeNFed please get tests to pass and then I'll merge

@mik-laj mik-laj added the area:upgrade Facilitating migration to a newer version of Airflow label Oct 1, 2020
@turbaszek
Copy link
Member

@edeNFed please get tests to pass and then I'll merge

@dimberman do you have an idea how to do this? I can see that tests were skipped in every PR opened to v1-10-test...
#11132
#11185

@potiuk
Copy link
Member

potiuk commented Oct 3, 2020

@edeNFed Can you please rebase to latest v1-10-test ? It should work now.

@edeNFed
Copy link
Author

edeNFed commented Oct 4, 2020

@dimberman @turbaszek all tests passed

Copy link
Member

@turbaszek turbaszek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the suggested change it looks good to me:

Connection.conn_id is not unique
--------------------------------
The `id` column in the `connection` table must be unique. Previously, this rule was enforced by application logic, but was not enforced by the database schema.

If you made any modifications to the table directly, make sure you don't have duplicate values in conn_id column.


Problems:
  1.  Connection.conn_id=aaa is not unique.

@potiuk potiuk linked an issue Oct 5, 2020 that may be closed by this pull request
Co-authored-by: Tomek Urbaszek <turbaszek@gmail.com>
@github-actions
Copy link

github-actions bot commented Oct 5, 2020

The CI and PROD Docker Images for the build are prepared in a separate "Build Image" workflow,
that you will not see in the list of checks (you will see "Wait for images" jobs instead).

You can checks the status of those images in The workflow run

@turbaszek turbaszek merged commit e367231 into apache:v1-10-test Oct 5, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented Oct 5, 2020

Awesome work, congrats on your first merged pull request!

turbaszek pushed a commit to PolideaInternal/airflow that referenced this pull request Oct 21, 2020
turbaszek pushed a commit to PolideaInternal/airflow that referenced this pull request Oct 23, 2020
@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
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.

Create UniqueConnIdRule to ease upgrade to Airflow 2.0
5 participants