Repository navigation
Description
Under which category would you file this issue?
Providers
Apache Airflow version
3.2.1
What happened and how to reproduce it?
Issue 1:
In the ui. If a dagrun has already succeeded we cannot "remark" it as succeeded which makes sense. However through the API patch_dag_run, when sending a payload such as
{
"state": "success",
"note": note,
}
It allows dag to be "remarked" as success. This has the unwanted effect of marking tasks that in the initial dag run were skipped or failed, to now be shown as success.
Issue 2:
When marking through the ui a dagrun that is currently running as success and failed we get different results.
- When doing
mark as failedall the tasks that haven't yet been executed get skipped and the dag gets failed asfailed- OK - See Image 2 - When doing
mark as success, all the tasks, even the ones that have been previously executed and succeeded/ failed or got skipped change their status to success. - This is misleading, as a task that has already happened should not have its status changed - See Image 3
Dag example. The ui is pressed once the dag is on task_mark_dag_here
from airflow.sdk import dag, task
import time
@dag
def test_short_circuit_dag():
@task.branch
def task_branch():
return "task_succeeds"
@task
def task_succeeds():
pass
@task
def task_skipped():
pass
@task(trigger_rule="all_done")
def task_fails_successfully():
raise Exception
@task(trigger_rule="one_failed")
def task_succeeds2():
pass
@task
def task_mark_dag_here():
time.sleep(5)
@task
def task_not_executed():
pass
task_succeeds_1 = task_succeeds()
task_branch() >> [task_succeeds_1, task_skipped()]
task_succeeds_1 >> task_fails_successfully() >> task_succeeds2() >> task_mark_dag_here() >> task_not_executed() >> task_not_executed()
test_short_circuit_dag()Image 1 - "Initial State"
Image 2 - Marking as Failed
Image 3 - Marking as Success
What you think should happen instead?
Issue 1:
if a dag has already succeeded sending a patch_dag_rung with the "state": "success" in the payload should not do anything.
Issue 2:
If the dag is running, pressing mark as success should:
- mark all next tasks as
skipped - not alter states of tasks that already executed
- mark dag as
success
Operating System
No response
Deployment
None
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
Not Applicable
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Activity
Cloud-Architect-Emma commentedon May 29, 2026
Hi @DonHaul, thanks for the detailed report. I'd like to work on this. Before I start, could you or a maintainer confirm the preferred fix approach for Issue 2, specifically whether mark as success should use the same task-skipping logic that mark as failed already applies correctly?
Happy to submit a PR once the approach is agreed.
pierrejeambrun commentedon Jul 1, 2026
I believe we can.
pierrejeambrun commentedon Jul 9, 2026
Closed by #68666