potiuk commented on pull request #19736: URL: https://github.com/apache/airflow/pull/19736#issuecomment-1003426676
> `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. Not really. We can - in this case - set BaseTrigger, TriggerEvent to None add the warning to "known warnings". As long as those classes are not actually 'run' during parsing the class (they shoud not be). It will work just fine. We've done that in other places: ``` try: from kubernetes.client import models as k8s except ImportError: log.warning( "The example_kubernetes_executor example DAG requires the kubernetes provider." " Please install it with: pip install apache-airflow[cncf.kubernetes]" ) k8s = None ``` -- 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]
