Repository navigation
Conversation
The _check_dag_runs_states helper returned True when no Dag runs existed inside execution_range because it only checked for bad states inside window and defaulted to True. This caused silent downstream execution with missing data. Introduce found_runs_in_window flag, return it instead of True. Apply same fix to ExternalTask sensor/trigger duplicates (4 locations total). This is a re-attempt of apache#61046 which was reverted in apache#61346 due to system test regression - this version fixes all 4 duplicated methods consistently, matching the ExternalTaskSensor pattern already used in Airflow. Fixes: apache#57512
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
|
@Vamsi-klu I'm sorry, but this a "no-go" from me - You basically duplicated your already existing open PR in #67052, in which I clarified that running the system tests is a condition for merging.
|
This comment was marked as spam.
This comment was marked as spam.
Thank you, highly appreciated :) |
Problem
CloudComposerDAGRunSensor and CloudComposerExternalTaskSensor (plus their deferrable triggers) returned True even when zero runs existed inside execution_range.
Repro:
Result: downstream tasks run with missing data — silent data loss, highest severity.
Same bug existed in 4 duplicated methods:
This is a re-attempt of #61046 which was reverted in #61346 due to system test regression. Previous fix covered only 1 sensor; this covers all 4.
What I did
Introduced found_runs_in_window / found_task_instances_in_window flag:
Fix applied to 4 locations in sensors and triggers.
Impact
Testing
Existing tests:
Manual reproduction (watch-it-fail):
Edge cases:
Static checks: ruff format/check passed, prek pre-commit passed, no new AirflowException.
Closes: #57512
Related: #61046, #61346
Was generative AI tooling used to co-author this PR?
Generated-by: Muse Spark 1.1 following the guidelines