potiuk commented on pull request #16264:
URL: https://github.com/apache/airflow/pull/16264#issuecomment-932980236


   @Jponte  - this "commonalising" of the code has it's drawback - nicely 
caught by our backwards compatibiliy installation and import tests for 
providers: 
https://github.com/apache/airflow/pull/16264/checks?check_run_id=3764848711#step:10:1463
  
   
   The problem is that if you extract some code to the "airflow.utils" package 
and create a new function/module there, the providers will not work for earlier 
airflow versions (because the "common" part is not there)
   
   We could increase min airflow version as dependency, but I think this 
feature does not justify it (it should still be possible to install the 
providers on Airflow 2.1+) so we need to make sure it is backwards-compatible.
   
   My suggestion is to keep a copy of the "common" methods in each of the 
providers affected (additionally to the common one) and implement a fallback to 
use those in case importing it from "utils" airflow code fails. When you mark 
it clearly as "to be remeoved"  after the provider depends on Airflow 2.2 being 
available) it will provide a clear path of the dupilicte code removal in the 
future.


-- 
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]


Reply via email to