Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dstandish committed Apr 27, 2024
1 parent a166e8d commit 9cfe9a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion airflow/models/taskinstance.py
Expand Up @@ -3087,14 +3087,18 @@ def handle_failure(
if TYPE_CHECKING:
assert self.task
assert self.task.dag
try:
fail_stop = self.task.dag.fail_stop
except Exception:
fail_stop = False
_handle_failure(
task_instance=self,
error=error,
session=session,
test_mode=test_mode,
context=context,
force_fail=force_fail,
fail_stop=self.task.dag.fail_stop,
fail_stop=fail_stop,
)

def is_eligible_to_retry(self):
Expand Down
6 changes: 5 additions & 1 deletion airflow/serialization/pydantic/taskinstance.py
Expand Up @@ -279,14 +279,18 @@ def handle_failure(
if TYPE_CHECKING:
assert self.task
assert self.task.dag
try:
fail_stop = self.task.dag.fail_stop
except Exception:
fail_stop = False
_handle_failure(
task_instance=self,
error=error,
session=session,
test_mode=test_mode,
context=context,
force_fail=force_fail,
fail_stop=self.task.dag.fail_stop,
fail_stop=fail_stop,
)

def refresh_from_task(self, task: Operator, pool_override: str | None = None) -> None:
Expand Down

0 comments on commit 9cfe9a5

Please sign in to comment.