This is an automated email from the ASF dual-hosted git repository. ash pushed a commit to branch v1-10-stable in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v1-10-stable by this push: new 5b48a53 [AIRFLOW-3973] Commit after each alembic migration (#4797) 5b48a53 is described below commit 5b48a5394ecf5aa1f2b50a00807e6149ade21968 Author: Elliott Shugerman <eshuger...@medianewsgroup.com> AuthorDate: Tue Jun 9 14:12:47 2020 -0600 [AIRFLOW-3973] Commit after each alembic migration (#4797) If `Variable`s are used in DAGs, and Postgres is used for the internal database, a fresh `$ airflow initdb` (or `$ airflow resetdb`) spams the logs with error messages (but does not fail). This commit corrects this by running each migration in a separate transaction. Co-authored-by: Elliott Shugerman <eeshuger...@medianewsgroup.com> (cherry picked from commit ea95e9c7236969acc807c65de0f12633d04753a0) --- airflow/migrations/env.py | 1 + 1 file changed, 1 insertion(+) diff --git a/airflow/migrations/env.py b/airflow/migrations/env.py index 2de0c2f..234c795 100644 --- a/airflow/migrations/env.py +++ b/airflow/migrations/env.py @@ -81,6 +81,7 @@ def run_migrations_online(): with connectable.connect() as connection: context.configure( connection=connection, + transaction_per_migration=True, target_metadata=target_metadata, compare_type=COMPARE_TYPE, render_as_batch=True