eskarimov commented on pull request #19736:
URL: https://github.com/apache/airflow/pull/19736#issuecomment-1015229080


   Sorry for bothering, just wanted to check if I could do anything here to 
improve the PR?
   
   Trying to summarise the points discussed:
   - Blocking call to fetch secrets/connection details with 
`self.get_connection()` - the current implementation wraps `databricks_conn()` 
into `cached_property` decorator, called during `DatabricksHook` 
initialization, not sure if we should change anything here now.
   - Provide a warning if deferrable operator being used in Airflow prior to 
2.2. An alternative option is to mark the provider as Airflow 2.2+ compatible, 
any input here is very welcome.
   
   I've also changed the initial approach for creating async hook methods - 
firstly I thought about creating class `DatabricksHookAsync` as a sub-class of 
`DatabricksHook`, to avoid duplicating code and having a clear separation 
between sync and async hook, but then I thought it'd be wrong to make it a 
sub-class, as we can't just replace usages of `DatabricksHook` with 
`DatabricksHookAsync`.
   Creating and supporting an independent `DatabricksHookAsync` class seems 
non-optimal as well. 
   So I ended up with creating async versions of regular functions inside 
`DatabricksHook`. Please let me know if there's any better way to do that.
   


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