Skip to content

Adds predefined providers to install_requires.#12916

Merged
potiuk merged 2 commits into
apache:masterfrom
astronomer:preinstall-some-providers
Dec 8, 2020
Merged

Adds predefined providers to install_requires.#12916
potiuk merged 2 commits into
apache:masterfrom
astronomer:preinstall-some-providers

Conversation

@ashb

@ashb ashb commented Dec 8, 2020

Copy link
Copy Markdown
Member

The 4 providers (http, ftp, sqlite, imap) are popular and they do not require any additionl dependencies so we decided to include them by default in Airflow 2.0

@potiuk Please take a look -- this is a simple subclassing of Distribution that means we can keep things in setup.cfg (which I get the impression the pip team want to encourage -- as it is statically parsable.)

Closes #12744


^ 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.

and they do not require any additionl dependencies so we decided
to include them by default in Airflow 2.0

Co-authored-by: Jarek Potiuk <[email protected]>
@ashb ashb added this to the Airflow 2.0.0rc1 milestone Dec 8, 2020
@ashb ashb added the full tests needed We need to run full set of tests for this PR to merge label Dec 8, 2020
@ashb
ashb requested a review from potiuk December 8, 2020 10:42
@RosterIn

RosterIn commented Dec 8, 2020

Copy link
Copy Markdown
Contributor

Question related to AIP-21:
"In case of transfer operators where two providers are involved, the transfer operators will be moved to "source" of the transfer. "

What will happen if FtpToXOperator will be added? This will add X as dependency to ftp provider.

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Love it. Much nicer way !

@ashb ashb changed the title The 4 providers (http, ftp, sqlite, imap) are popular and they do not require any additionl dependencies so we decided to include them by default in Airflow 2.0 Adds predefined providers to install_requires. Dec 8, 2020
@potiuk

potiuk commented Dec 8, 2020

Copy link
Copy Markdown
Member

What will happen if FtpToXOperator will be added? This will add X as dependency to ftp provider

This AIP has been updated several times, and while we keep all the historical votings, there are also some subsequent changes. So AIP is mostly kept as historical records and it contains several updates (there were several rounds of additional changes and votes after the original voting passed).

If you want to see final decisions made and current status of naming conventions just look here (I will update that information in the AIP-21 to direct people there):

https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#naming-conventions-for-provider-packages

First of all FTPToX will by default land in "X" not in FTP (that has reversed since the first AIP-21 voting). The main criteria we have when we decide is who is most interested (stakeholder) in maintaining specific provider (and assumption is that the "target" side cares more and has more stakes in getting the data).

So FTPtoS3 will go to Amazon, FTPToGCS will go to Google.

In case of FTP/HTTP/IMAP/SQLITE - those are "generic" providers that have no clear stakeholders behind, so even GCSToFTP will go to Google and S3ToFTP will go to Amazon, even if they re the "source", this is a case-by-case decision but in case of very generic operators, databases which are not run "as a service" only, this is rather clear which direction it should go.

@potiuk

potiuk commented Dec 8, 2020

Copy link
Copy Markdown
Member

Screenshot from 2020-12-08 13-08-19

@RosterIn - I hope that will make it clear :)

@potiuk

potiuk commented Dec 8, 2020

Copy link
Copy Markdown
Member

And the wording in "naming convention" is I think rather clear:

It is often debatable where to put transfer operators but we agreed to the following criteria:

  • We use "maintainability" of the operators as the main criteria - so the transfer operator should be kept at the provider which has highest "interest" in the transfer operator
  • For Cloud Providers or Service providers that usually means that the transfer operators should land at the "target" side of the transfer

Comment thread setup.py Outdated
@potiuk
potiuk merged commit e7c1771 into apache:master Dec 8, 2020
@ashb
ashb deleted the preinstall-some-providers branch December 8, 2020 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full tests needed We need to run full set of tests for this PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Difference of extras Airflow 2.0 vs. Airflow 1.10

4 participants