You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hussein-awala (via GitHub)" <gi...@apache.org> on 2023/09/27 19:10:51 UTC
[GitHub] [airflow] hussein-awala commented on a diff in pull request #34652: Fix `dag.test()` and Respect 'soft_fail' argument when running ExternalTaskSensor
hussein-awala commented on code in PR #34652:
URL: https://github.com/apache/airflow/pull/34652#discussion_r1339084563
##########
airflow/sensors/external_task.py:
##########
@@ -163,9 +163,11 @@ def __init__(
total_states = set(self.allowed_states + self.skipped_states + self.failed_states)
if len(total_states) != len(self.allowed_states) + len(self.skipped_states) + len(self.failed_states):
- raise AirflowException(
- "Duplicate values provided across allowed_states, skipped_states and failed_states."
- )
+ # TODO: remove this if block when min_airflow_version is set to higher than 2.7.1
+ message = "Duplicate values provided across allowed_states, skipped_states and failed_states."
+ if self.soft_fail:
+ raise AirflowSkipException(message)
+ raise AirflowException(message)
Review Comment:
If there is a problem in the init, it will never arrive to an execution state, so don't need it.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org