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/21 10:01:28 UTC
[airflow] branch master updated: 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 master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new 3188b13 Fix wait-for-migrations command in helm chart (#12522)
3188b13 is described below
commit 3188b130b5f61332e24c340ac6c0569efa4e8056
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.)
---
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" -}}