-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Labels
affected_version:3.1Issues Reported for 3.1Issues Reported for 3.1area:Triggererarea:corekind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
Description
Apache Airflow version
3.1.1
If "Other Airflow 2/3 version" selected, which one?
No response
What happened?
When using the TriggerDagRunOperator with a given trigger_run_id, wait_for_completion, and reset_dag_run set to True, the operator remains stuck in a deferred state forever once I restarted the task.
What you think should happen instead?
Instead, once the DAG run has been reset and completed, the trigger should mark the state as success.
How to reproduce
Add two dags, one that triggers, the other is triggered:
DAG 1:
with DAG(
dag_id="test1",
schedule=None,
start_date=pendulum.datetime(2020, 1, 1),
tags=[],
default_args={},
max_active_runs=1,
is_paused_upon_creation=False,
) as dag:
TriggerDagRunOperator(
task_id="trigger_test2_dag",
trigger_dag_id="test2",
trigger_run_id="a_dag_run_id", # important
wait_for_completion=True, # important
deferrable=True, # important
reset_dag_run=True, # important
retries=0,
)
DAG 2 (does nothing really):
with DAG(
dag_id="test2",
schedule=None,
start_date=pendulum.datetime(2020, 1, 1),
tags=[],
default_args={},
max_active_runs=1,
is_paused_upon_creation=False,
) as dag:
@task()
def hello_world():
print("Hello, World!")
hello_world()
Then:
- Manually trigger
test1 test2will be scheduled, then successes. Seconds later,test1task succeeds.- Clear the same task in
test1so it re-triggerstest2with the samedag_run_id. test2DAG will be reset, and completes without issues.- The only
test1task is now stuck indeferredstate forever
Operating System
Debian GNU/Linux 12 (bookworm)
Versions of Apache Airflow Providers
apache-airflow-providers-standard==1.9.0
Deployment
Docker-Compose
Deployment details
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
Metadata
Metadata
Assignees
Labels
affected_version:3.1Issues Reported for 3.1Issues Reported for 3.1area:Triggererarea:corekind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet