Taragolis opened a new pull request, #27088:
URL: https://github.com/apache/airflow/pull/27088
Last couple of days quite a few CI tests failed with selected error
```
__________________ TestCliDags.test_trigger_dag_invalid_conf
___________________
self = <tests.cli.commands.test_dag_command.TestCliDags object at
0x7effeda0e790>
def test_trigger_dag_invalid_conf(self):
with pytest.raises(ValueError):
dag_command.dag_trigger(
self.parser.parse_args(
[
'dags',
'trigger',
'example_bash_operator',
'--run-id',
'trigger_dag_xxx',
'--conf',
> 'NOT JSON',
]
),
)
...
E airflow.exceptions.DagRunAlreadyExists: A Dag Run already exists for dag
id example_bash_operator at 2022-10-16 14:41:31+00:00 with run id
trigger_dag_xxx
airflow/api/common/trigger_dag.py:79: DagRunAlreadyExists
```
This happen because we do not cleanup DagRuns between the tests within the
test class and time to time it uses the same execution date / run_id.
It also might happen because config validation happen after create DagRun.
Current fix also might solve other race conditions in this test class
--
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]