You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "gvergnolle (via GitHub)" <gi...@apache.org> on 2025/11/03 16:16:38 UTC
[I] Deferrable mode of TriggerDagRunOperator stays stuck if used with `reset_dag_run` [airflow]
gvergnolle opened a new issue, #57756:
URL: https://github.com/apache/airflow/issues/57756
### 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`
- `test2` will be scheduled, then successes. Seconds later, `test1` task succeeds.
- Clear the same task in `test1` so it re-triggers `test2` with the same `dag_run_id`.
- `test2` DAG will be reset, and completes without issues.
- The only `test1` task is now stuck in `deferred` state 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
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Deferrable mode of TriggerDagRunOperator stays stuck if used with `reset_dag_run` [airflow]
Posted by "raphaelauv (via GitHub)" <gi...@apache.org>.
raphaelauv commented on issue #57756:
URL: https://github.com/apache/airflow/issues/57756#issuecomment-3483661381
until it's fix , what happen if you set skip_when_already_exists=True ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Deferrable mode of TriggerDagRunOperator stays stuck if used with `reset_dag_run` [airflow]
Posted by "mykola-shyshov (via GitHub)" <gi...@apache.org>.
mykola-shyshov commented on issue #57756:
URL: https://github.com/apache/airflow/issues/57756#issuecomment-3492959154
I was able to reproduce it. Seems like I found root issue. Every start after clearing happens with new logical data. But DAG 2 keeps the original logical data. Due to this mismatch it can not link completion to the first DAG.
I need to think about good solution.
<img width="1121" height="573" alt="Image" src="https://github.com/user-attachments/assets/99001c47-eabf-41f4-b3a9-909e8a3c391a" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Deferrable mode of TriggerDagRunOperator stays stuck if used with `reset_dag_run` [airflow]
Posted by "mykola-shyshov (via GitHub)" <gi...@apache.org>.
mykola-shyshov commented on issue #57756:
URL: https://github.com/apache/airflow/issues/57756#issuecomment-3491899700
Hello. I will try to reproduce. And investigate issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Deferrable mode of TriggerDagRunOperator stays stuck if used with `reset_dag_run` [airflow]
Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl closed issue #57756: Deferrable mode of TriggerDagRunOperator stays stuck if used with `reset_dag_run`
URL: https://github.com/apache/airflow/issues/57756
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org