Skip to content

Conversation

@sunank200
Copy link
Collaborator

@sunank200 sunank200 commented Feb 24, 2025

Previously, combining a dag_run_id with include_past or include_future flags in the clearTaskInstances API could lead to unintended behaviour - especially for manually triggered runs (logical_date=None), which cleared TIs from previous runs. This PR adds validation to return a 400 error when these flags are used together with dag_run_id.

closes: #46887


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Feb 24, 2025
@sunank200 sunank200 force-pushed the ti-clear-logical-date-none branch from 19f46a1 to 2cd1d73 Compare February 24, 2025 20:25
@sunank200 sunank200 requested review from Lee-W, ashb and uranusjr February 24, 2025 20:26
@sunank200 sunank200 changed the title Return 400 for dag_run_id with include_past/include_future in clearTa… Return 400 for dag_run_id with include_past/include_future in clearTaskInstances API Feb 24, 2025
@Lee-W Lee-W merged commit 8d3c8bf into apache:main Feb 25, 2025
45 checks passed
@Lee-W Lee-W deleted the ti-clear-logical-date-none branch February 25, 2025 02:47
ambika-garg pushed a commit to ambika-garg/airflow that referenced this pull request Feb 28, 2025
nailo2c pushed a commit to nailo2c/airflow that referenced this pull request Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When logical_date = None, “Past” and “Future” in TI clear UI do not make sense

2 participants