Skip to content

CloudComposerExternalTaskSensor succeeds when all task instances are outside execution_range #67051

@Vamsi-klu

Description

@Vamsi-klu

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:bugThis is a clearly a bugprovider:googleGoogle (including GCP) related issues

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions