You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/17 08:42:10 UTC

[GitHub] [airflow] Taragolis opened a new pull request, #27088: Fix flakey test `TestCliDags.test_trigger_dag_invalid_conf`

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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #27088: Fix flakey test `TestCliDags.test_trigger_dag_invalid_conf`

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #27088:
URL: https://github.com/apache/airflow/pull/27088#issuecomment-1289147057

   Cool. Thanks @Taragolis -> less flaky == better :)


-- 
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


[GitHub] [airflow] potiuk merged pull request #27088: Fix flakey test `TestCliDags.test_trigger_dag_invalid_conf`

Posted by GitBox <gi...@apache.org>.
potiuk merged PR #27088:
URL: https://github.com/apache/airflow/pull/27088


-- 
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