-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AIRFLOW-3973] Commit after each alembic migration #4797
Conversation
initdb
spams log with errors | solution: run each migration in its own transactionIf `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.
Codecov Report
@@ Coverage Diff @@
## master #4797 +/- ##
=======================================
Coverage 74.44% 74.44%
=======================================
Files 450 450
Lines 28970 28970
=======================================
Hits 21566 21566
Misses 7404 7404 Continue to review full report at Codecov.
|
Thanks @eeshugerman for figuring this out. |
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.
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.
@Fokko Could we backport this to v1.10? Is it just a matter of opening a PR to |
@eeshugerman please make a PR to the |
Just a small update: I think merge PR should go to v1-10-stable - in test we are usually cherry-pick stuff (I have 23 cherry-picked commits to push soon) so better to keep it this way. |
A cherry-pick/rebase was required to get a clean PR to I'm assuming the failing |
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 <[email protected]> (cherry picked from commit ea95e9c)
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 <[email protected]> (cherry picked from commit ea95e9c)
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 <[email protected]> (cherry picked from commit ea95e9c)
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 <[email protected]> (cherry picked from commit ea95e9c)
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 <[email protected]> (cherry picked from commit ea95e9c) (cherry picked from commit 5b48a53)
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 <[email protected]> (cherry picked from commit ea95e9c)
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 <[email protected]> (cherry picked from commit ea95e9c)
Jira
https://issues.apache.org/jira/browse/AIRFLOW-3973
Description
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.
See Jira ticket for more details.
I have tested this change with the default SQLite database and, of course, with Postgres.
Tests
No tests included as this is a one line change which adds no functionality whatsoever.