Skip to content

Conversation

@justinpakzad
Copy link
Contributor

This PR implements state validation for the dag run delete endpoint. If the state of the dag run is not in the DAGRunPatchStates (i.e. if it's running) we return a 409 error indicating that it can't be deleted in said state. I added an additional test which attempts to delete a dag run while it's in a running state and validates the expected response.

closes: #59497


^ 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 airflow-core/newsfragments.

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Jan 6, 2026
@justinpakzad justinpakzad marked this pull request as ready for review January 7, 2026 00:44
Copy link
Member

@jason810496 jason810496 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! LGTM if CI pass.

@jason810496 jason810496 added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Jan 7, 2026
Copy link
Contributor

@phanikumv phanikumv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@potiuk potiuk merged commit 85842d4 into apache:main Jan 7, 2026
247 checks passed
@potiuk potiuk added this to the Airflow 3.1.6 milestone Jan 7, 2026
github-actions bot pushed a commit that referenced this pull request Jan 7, 2026
(cherry picked from commit 85842d4)

Co-authored-by: Justin Pakzad <justinpak303@gmail.com>
@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Backport successfully created: v3-1-test

Status Branch Result
v3-1-test PR Link

potiuk pushed a commit that referenced this pull request Jan 7, 2026
#60207)

(cherry picked from commit 85842d4)

Co-authored-by: Justin Pakzad <justinpak303@gmail.com>
chirodip98 pushed a commit to chirodip98/airflow-contrib that referenced this pull request Jan 9, 2026
stegololz pushed a commit to stegololz/airflow that referenced this pull request Jan 9, 2026
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 backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delete dag run endpoint returns 204 even if run could not be deleted

4 participants