argibbs commented on code in PR #23647:
URL: https://github.com/apache/airflow/pull/23647#discussion_r893516276
##########
airflow/sensors/external_task.py:
##########
@@ -180,11 +198,20 @@ def poke(self, context, session=None):
if count_failed == len(dttm_filter):
if self.external_task_ids:
+ if self.soft_fail:
+ raise AirflowSkipException(
+ f'Some of the external tasks {self.external_task_ids} '
+ f'in DAG {self.external_dag_id} failed. Skipping due
to soft_fail.'
+ )
raise AirflowException(
f'Some of the external tasks {self.external_task_ids} '
f'in DAG {self.external_dag_id} failed.'
)
else:
+ if self.soft_fail:
+ raise AirflowSkipException(
+ f'The external DAG {self.external_dag_id} failed. '
'Skipping due to soft_fail'
Review Comment:
Ah sorry - this is me running black and not properly vetting the result.
Will fix.
--
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]