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


   Thinking loud about the second approach with trying and catching exceptions:
   when we catch `ImportError` on importing non-existing classes 
`airflow.triggers.base.BaseTrigger` and `airflow.triggers.base.TriggerEvent` 
how it'd be better to handle the exception?
   
   `DatabricksExecutionTrigger` [is inherited from 
`BaseTrigger`](https://github.com/apache/airflow/blob/7893d94e1502fd1f46e7732f08c04fb1c194a06d/airflow/providers/databricks/triggers/databricks.py#L26).
 So if we just log a warning on importing Airflow 2.2+ classes, the CI check 
will still fail, because `BaseTrigger` and `TriggerEvent` won't be defined.
   
   I was thinking about using the abstract class as a substitute of 
non-existing classes if `ImportError` was raised, but not sure, if it'd be the 
right approach.


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