aamster opened a new issue, #30866:
URL: https://github.com/apache/airflow/issues/30866
### Apache Airflow version
2.5.3
### What happened
TriggerDagRunOperator succeeds when dag_id doesn't exist
### What you think should happen instead
TriggerDagRunOperator should fail when dag_id doesn't exist
### How to reproduce
```
import datetime
from airflow.decorators import task
from airflow.models import Param
from airflow.models.dag import dag
@dag(
schedule=None,
catchup=False,
start_date=datetime.datetime.now(),
params={
'name': Param(
default=None
)
},
dag_id='my_dag'
)
def my_dag():
@task
def my_task(**context):
print(context['params']['name'])
my_task()
my_dag()
```
```
import datetime
from airflow.decorators import task
from airflow.models.dag import dag
from airflow.operators.trigger_dagrun import TriggerDagRunOperator
@dag(
schedule=None,
catchup=False,
start_date=datetime.datetime.now(),
dag_id='my_dag_trigger'
)
def my_dag_trigger():
@task
def my_task():
TriggerDagRunOperator(
task_id='my_task',
trigger_dag_id='bad',
conf={
'params': {
'name': 'foo!!!'
}
}
)
my_task()
my_dag_trigger()
```
### Operating System
linux
### Versions of Apache Airflow Providers
_No response_
### Deployment
Other
### 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]