You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/11/29 23:59:55 UTC
[airflow] 08/18: Fix wait-for-migrations command in helm chart
(#12522)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 9f90eb0630ed440b764524b7177ad8ddc9d51b1c
Author: Ash Berlin-Taylor <as...@firemirror.com>
AuthorDate: Sat Nov 21 10:00:02 2020 +0000
Fix wait-for-migrations command in helm chart (#12522)
If the migrations weren't yet applied this would fail with `NameError:
name 'log' is not defined`. (I guess no one really noticed as the
container would restart, and try again.)
(cherry picked from commit 3188b130b5f61332e24c340ac6c0569efa4e8056)
---
chart/templates/_helpers.yaml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/chart/templates/_helpers.yaml b/chart/templates/_helpers.yaml
index 98efc9f..530b1d0 100644
--- a/chart/templates/_helpers.yaml
+++ b/chart/templates/_helpers.yaml
@@ -367,6 +367,7 @@ server_tls_key_file = /etc/pgbouncer/server.key
- -c
- |
import airflow
+ import logging
import os
import time
@@ -399,7 +400,7 @@ server_tls_key_file = /etc/pgbouncer/server.key
raise TimeoutError("There are still unapplied migrations after {} seconds.".format(ticker))
ticker += 1
time.sleep(1)
- log.info('Waiting for migrations... %s second(s)', ticker)
+ logging.info('Waiting for migrations... %s second(s)', ticker)
{{- end }}
{{ define "registry_docker_config" -}}