potiuk commented on code in PR #42891:
URL: https://github.com/apache/airflow/pull/42891#discussion_r1800210134


##########
providers/src/airflow/providers/common/sql/operators/sql.py:
##########
@@ -145,13 +145,25 @@ def __init__(
         self.hook_params = hook_params or {}
         self.retry_on_failure = retry_on_failure
 
+    @classmethod

Review Comment:
   When we move the generic_transfer to standard provider, the user might be 
able to install it and run on Airflow 2 and convert their DAG to use the 
operators / hooks / etc. from the  "standard" provider. This is happening in 
order to ease the migration. 
   
   But this means that theoretically, one can install new "standard provider" 
and old "common.sql" that has no this method installed.  In order to enforce 
the right dependency - when you extract generic_transfer to standard provider 
you should add dependency to the standard provider:
   
   ```
   common-sql >= UPCOMING_VERSION_OF_COMMON_SQL (which is the next minor 
version as we are adding this method as a new feature)
   ```
   
   This will make sure that when "standard" provider is installed, common-sql 
will always be >= NEW_VERSION_OF_COMMON_SQL that contains the new get_hook 
method - thus the method will be usable by the `generic_transfer` from the 
standard provider.
   



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to