ohaibbq opened a new pull request, #32731: URL: https://github.com/apache/airflow/pull/32731
We are utilizing the new `dag.test()` functionality with a Postgres-backed SQLAlchemy engine/session. We use the `airflow.utils.initdb()` and `airflow.utils.resetdb()` functions for test case setup/teardown. When the schema is created for the second time, these event listeners add duplicate indexes to the SQLAlchemy `Table` definition, which causes the `metadata.create_all()` function to fail with a `DatabaseError` as it issues multiple `CREATE UNIQUE INDEX` statements for `idx_ab_user_username` and `idx_ab_register_user_username`. This updates the listeners to check if the indexes have already been added before adding them to the `Table` definition. -- 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]
