From de4fd53fcbd4badba34322589c7518e521b0808c Mon Sep 17 00:00:00 2001 From: David Koenitzer Date: Fri, 9 Dec 2022 12:39:17 -0500 Subject: [PATCH] fix SQL CONN deprecation warnings (#941) * fix deprecation warnings * fix deprecation warnings * tests * rerun tests * fix tests * fix test --- airflow/docker_test.go | 5 +++++ airflow/include/composeyml.go | 3 +++ settings/testfiles/airflow_settings_export.yaml | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/airflow/docker_test.go b/airflow/docker_test.go index a60862b73..d6f7d212c 100644 --- a/airflow/docker_test.go +++ b/airflow/docker_test.go @@ -100,6 +100,7 @@ services: environment: AIRFLOW__CORE__EXECUTOR: LocalExecutor AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://postgres:postgres@postgres:5432 + AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql://postgres:postgres@postgres:5432 AIRFLOW__CORE__LOAD_EXAMPLES: "False" AIRFLOW__CORE__FERNET_KEY: "d6Vefz3G9U_ynXB3cr7y_Ak35tAHkEGAVxuz_B-jzWw=" ASTRONOMER_ENVIRONMENT: local @@ -135,6 +136,7 @@ services: environment: AIRFLOW__CORE__EXECUTOR: LocalExecutor AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://postgres:postgres@postgres:5432 + AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql://postgres:postgres@postgres:5432 AIRFLOW__CORE__LOAD_EXAMPLES: "False" AIRFLOW__CORE__FERNET_KEY: "d6Vefz3G9U_ynXB3cr7y_Ak35tAHkEGAVxuz_B-jzWw=" AIRFLOW__WEBSERVER__RBAC: "True" @@ -210,6 +212,7 @@ services: environment: AIRFLOW__CORE__EXECUTOR: LocalExecutor AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://postgres:postgres@postgres:5432 + AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql://postgres:postgres@postgres:5432 AIRFLOW__CORE__LOAD_EXAMPLES: "False" AIRFLOW__CORE__FERNET_KEY: "d6Vefz3G9U_ynXB3cr7y_Ak35tAHkEGAVxuz_B-jzWw=" ASTRONOMER_ENVIRONMENT: local @@ -245,6 +248,7 @@ services: environment: AIRFLOW__CORE__EXECUTOR: LocalExecutor AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://postgres:postgres@postgres:5432 + AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql://postgres:postgres@postgres:5432 AIRFLOW__CORE__LOAD_EXAMPLES: "False" AIRFLOW__CORE__FERNET_KEY: "d6Vefz3G9U_ynXB3cr7y_Ak35tAHkEGAVxuz_B-jzWw=" AIRFLOW__WEBSERVER__RBAC: "True" @@ -282,6 +286,7 @@ services: environment: AIRFLOW__CORE__EXECUTOR: LocalExecutor AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://postgres:postgres@postgres:5432 + AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql://postgres:postgres@postgres:5432 AIRFLOW__CORE__LOAD_EXAMPLES: "False" AIRFLOW__CORE__FERNET_KEY: "d6Vefz3G9U_ynXB3cr7y_Ak35tAHkEGAVxuz_B-jzWw=" AIRFLOW__WEBSERVER__RBAC: "True" diff --git a/airflow/include/composeyml.go b/airflow/include/composeyml.go index 260681b9b..3353a8cb9 100644 --- a/airflow/include/composeyml.go +++ b/airflow/include/composeyml.go @@ -50,6 +50,7 @@ services: environment: AIRFLOW__CORE__EXECUTOR: LocalExecutor AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://{{ .PostgresUser }}:{{ .PostgresPassword }}@{{ .PostgresHost }}:5432 + AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql://{{ .PostgresUser }}:{{ .PostgresPassword }}@{{ .PostgresHost }}:5432 AIRFLOW__CORE__LOAD_EXAMPLES: "False" AIRFLOW__CORE__FERNET_KEY: "d6Vefz3G9U_ynXB3cr7y_Ak35tAHkEGAVxuz_B-jzWw=" ASTRONOMER_ENVIRONMENT: local @@ -87,6 +88,7 @@ services: environment: AIRFLOW__CORE__EXECUTOR: LocalExecutor AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://{{ .PostgresUser }}:{{ .PostgresPassword }}@{{ .PostgresHost }}:5432 + AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql://{{ .PostgresUser }}:{{ .PostgresPassword }}@{{ .PostgresHost }}:5432 AIRFLOW__CORE__LOAD_EXAMPLES: "False" AIRFLOW__CORE__FERNET_KEY: "d6Vefz3G9U_ynXB3cr7y_Ak35tAHkEGAVxuz_B-jzWw=" AIRFLOW__WEBSERVER__RBAC: "True" @@ -124,6 +126,7 @@ services: environment: AIRFLOW__CORE__EXECUTOR: LocalExecutor AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://{{ .PostgresUser }}:{{ .PostgresPassword }}@{{ .PostgresHost }}:5432 + AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql://{{ .PostgresUser }}:{{ .PostgresPassword }}@{{ .PostgresHost }}:5432 AIRFLOW__CORE__LOAD_EXAMPLES: "False" AIRFLOW__CORE__FERNET_KEY: "d6Vefz3G9U_ynXB3cr7y_Ak35tAHkEGAVxuz_B-jzWw=" AIRFLOW__WEBSERVER__RBAC: "True" diff --git a/settings/testfiles/airflow_settings_export.yaml b/settings/testfiles/airflow_settings_export.yaml index 4e970c1c8..d6479b427 100644 --- a/settings/testfiles/airflow_settings_export.yaml +++ b/settings/testfiles/airflow_settings_export.yaml @@ -7,7 +7,7 @@ airflow: conn_login: username conn_password: password conn_port: 5432 - conn_uri: postgres://username:password@example.db.example.com:5432/schema + conn_uri: "" conn_extra: {} pools: - pool_name: pool_name