apache / apache/airflow

CloudComposerExternalTaskSensor succeeds when all task instances are outside execution_range

Open
#67,051 0 comments 0 reactions 0 assignees View on GitHub
kind:bug provider:google
Dominant language
Python
Stars
46.9k
Forks
17.8k
Avg merge
2d 9h
Merged PRs (30d)
472

Description

`CloudComposerExternalTaskSensor` and `CloudComposerExternalTaskTrigger` appear to use the same window-checking pattern that previously caused `CloudComposerDAGRunSensor` to return success when all returned runs were outside the requested execution window.

Today the helper returns success as long as it does not find an in-window task instance in a disallowed state. If every returned task instance falls outside the requested `execution_range`, the helper still reports success instead of continuing to wait for a relevant in-window task instance.

This follow-up issue tracks:
- confirming the bug in both the sync sensor and deferrable trigger paths
- adding unit coverage for all-out-of-window, mixed-window, and boundary cases
- fixing both helpers so they only succeed when at least one task instance is inside the requested window and all in-window task instances satisfy the expected state set

This is intentionally tracked separately from the Dag-run sensor fix to keep that PR scoped to one behavior change.

---
Drafted-by: Codex (GPT-5) (no human review before posting)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.