Lohith625 commented on code in PR #56924:
URL: https://github.com/apache/airflow/pull/56924#discussion_r2631286281
##########
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:
That’s a fair point.
The try/except was added defensively because this code lives in a provider,
which can be installed against different core versions and environments. My
intent was to avoid import-time failures in edge cases and fail more gracefully.
If the expectation is that this code path always runs in a strict Airflow 3
environment, I agree the catch is unnecessary and can be removed. I’m happy to
simplify this accordingly.
--
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]