potiuk commented on PR #22692: URL: https://github.com/apache/airflow/pull/22692#issuecomment-1087495983
@alexott @dbarrundiag I think separation makes sense but there should be a deliberate effort to re-use common code and possibly this can be done with the way we learned when we implemented Dataflow. And it's good to consider and review the current code and see if the duplication can be removed (I do not know enough about either so I leave it up to you to decide how to approach it). You can take a look at Apache Beam and Dataflow relation (in google provider) which is similar: * we have the apache-airlfow-providers-google provider with Dataflow (Apache Beam service) * we have a separate apache-airlfow-providers-apache-beam Those two packages have extras which make them depend on each other - i.e. if someone wants to use Google Provider to just manage Dataflow instances - they can just install `apache-airflow-providers-google` but if they also want to use it to run Apache Beam jobs within such instance, they can install `apache-airflow-providers-google[apache.beam]` (and in reverse if they use Apache Beam and want to use Dataflow they can install `apache-airflow-providers-apache-beam[google]`. Or they can simply install both providers. Google has host of dependencies on its own but Apache Beam brings AWFULLY lot more (in fact Apache Beam was a single reason why we released Python 3.10 and ARM support that late). So situation was rather similar. Initially we only had Dataflow Provider and Apache Beam was extracted here: * https://github.com/apache/airflow/pull/12814/ And then there were some follow-up changes to reuse more common code, for example: * https://github.com/apache/airflow/pull/14094 We already handle nicely "optional" features in Providers - i.e. if some of the cross-providers dependencies are missing and the import errors are handled gracefully (only visinle in debug logs) - to account for such "optional" features - so the "Databricks" provider does not have to have all the dependencies of delta-sharing. Extra indicates that you can use one with the other and some code in delta-sharing might be used from Databricks one so there is no unnecessary duplication involved. Actually we even detect such cross-provider dependencies automatically, so there is even no need to remember about it when we prepare changelog (but we can also optionally add dependencies for minimum versions of providers in case there are some expectations about the cross-provider versions, which we already used for example with sftp <> ssh cross-provider dependencies. Google has more such cross-provider depdendencies (but take a look at apache.beam): https://airflow.apache.org/docs/apache-airflow-providers-google/stable/index.html#cross-provider-package-dependencies -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
