Skip to content

Align deferred sensor soft-fail handling with regular execution - #75004

Open
vividbaek wants to merge 1 commit into
apache:mainfrom
vividbaek:fix/deferred-sensor-soft-fail-71255
Open

vividbaek wants to merge 1 commit into
apache:mainfrom
vividbaek:fix/deferred-sensor-soft-fail-71255

Conversation

@vividbaek

Copy link
Copy Markdown
Contributor

Deferred sensors with soft_fail=True currently turn unexpected errors into skips, hiding missing resources and trigger failures. Preserve these errors on resume and apply soft_fail to the same exception types as the regular sensor execution path: AirflowSensorTimeout, AirflowTaskTimeout, and AirflowFailException.

Also catch AirflowTaskTimeout on resume so both soft_fail and never_fail can convert it to a skip. This extends never_fail handling for task timeouts; its handling of other errors is unchanged.

Validation:

  • Updated sensor test file: 52 passed on upstream main at 9ad8d78c27 (Python 3.11, Breeze).
  • Identical tests against the original implementation at 7a479a62e6: 5 failed, 47 passed. Failures cover generic errors, missing resources, trigger failure, and task timeouts under both flags.
  • Ruff, pre-commit checks (including Task SDK mypy), and applicable manual checks passed.

This follows the behavior discussed in the closed, unmerged PR #72053. Full worker/triggerer integration has not been tested.

closes: #71255


Was generative AI tooling used to co-author this PR?
  • Yes — Codex (GPT-6); Antigravity assisted with review.

Generated-by: Codex (GPT-6) following the guidelines

Unexpected sensor errors should remain visible regardless of whether the
sensor defers. Treating missing resources and trigger failures as skips
hides operational failures, while uncaught task timeouts ignore the
configured failure policy.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deferred sensors with soft_fail=True lack parity skip on non-timeout failures

1 participant