ephraimbuddy commented on code in PR #56924:
URL: https://github.com/apache/airflow/pull/56924#discussion_r2626401572
##########
providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py:
##########
@@ -264,7 +272,26 @@ def execute(self, context: Context):
)
def _trigger_dag_af_3(self, context, run_id, parsed_logical_date):
- from airflow.providers.common.compat.sdk import DagRunTriggerException
+ try:
+ from airflow.providers.common.compat.sdk import
DagRunTriggerException
+ except Exception:
+ if TYPE_CHECKING:
+ from airflow.providers.common.compat.sdk import (
Review Comment:
This method is for airflow 3, why do you think we need this catch
##########
providers/standard/tests/unit/standard/operators/test_trigger_dagrun.py:
##########
@@ -42,7 +42,10 @@
from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS,
AIRFLOW_V_3_1_PLUS
if AIRFLOW_V_3_0_PLUS:
- from airflow.providers.common.compat.sdk import DagRunTriggerException
+ from airflow.exceptions import DagRunTriggerException
Review Comment:
Why the change in this import path?
--
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]