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/09/27 17:04:53 UTC

[airflow] branch v1-10-test updated (4da9bb3 -> f74bedd)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a change to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git.


    from 4da9bb3  Conditional MySQL Client installation (#11174)
     new 6359b7e  Fix user in helm chart pgbouncer deployment (#11143)
     new 8019341  Make sure pgbouncer-exporter docker image is linux/amd64 (#11148)
     new f74bedd  Update to latest version of pbgouncer-exporter (#11150)

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../pgbouncer-exporter/build_and_push.sh           | 42 +++-------------------
 .../templates/pgbouncer/pgbouncer-deployment.yaml  |  2 +-
 chart/values.yaml                                  |  2 +-
 3 files changed, 6 insertions(+), 40 deletions(-)


[airflow] 02/03: Make sure pgbouncer-exporter docker image is linux/amd64 (#11148)

Posted by po...@apache.org.
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 801934180e770fb5d943b96bfe961ea5affa9c25
Author: Ruben Laguna <ru...@gmail.com>
AuthorDate: Fri Sep 25 17:26:44 2020 +0200

    Make sure pgbouncer-exporter docker image is linux/amd64 (#11148)
    
    Closes #11145
    
    (cherry picked from commit 33fe9a52cd6fff092f4de977415666d7f3c64d6e)
---
 .../pgbouncer-exporter/build_and_push.sh           | 40 ++--------------------
 1 file changed, 3 insertions(+), 37 deletions(-)

diff --git a/chart/dockerfiles/pgbouncer-exporter/build_and_push.sh b/chart/dockerfiles/pgbouncer-exporter/build_and_push.sh
index 4fac8f2..da204b6 100755
--- a/chart/dockerfiles/pgbouncer-exporter/build_and_push.sh
+++ b/chart/dockerfiles/pgbouncer-exporter/build_and_push.sh
@@ -35,44 +35,10 @@ readonly COMMIT_SHA
 
 cd "$( dirname "${BASH_SOURCE[0]}" )" || exit 1
 
-current_go_version=$("go${EXPECTED_GO_VERSION}" version 2>/dev/null | awk '{ print $3 }' 2>/dev/null || true)
-
-if [[ ${current_go_version} == "" ]]; then
-  current_go_version=$(go version 2>/dev/null | awk '{ print $3 }' 2>/dev/null)
-  GO_BIN=$(command -v go 2>/dev/null || true)
-else
-  GO_BIN=$(command -v go${EXPECTED_GO_VERSION} 2>/dev/null)
-fi
-readonly GO_BIN
-
-if [[ ${current_go_version} == "" ]]; then
-  echo "ERROR! You have no go installed"
-  echo
-  echo "Please install go${EXPECTED_GO_VERSION} to build the package"
-  echo
-  echo "You need to have golang installed. Follow https://golang.org/doc/install"
-  echo
-fi
-
-if [[ ${current_go_version} != "go${EXPECTED_GO_VERSION}" ]]; then
-  echo "ERROR! You have unexpected version of go in the path ${current_go_version}"
-  echo
-  echo "Make sure you have go${EXPECTED_GO_VERSION} installed:"
-  echo
-  echo "   go get golang.org/dl/go${EXPECTED_GO_VERSION}"
-  echo
-  echo "   go${EXPECTED_GO_VERSION} download"
-  echo
-  echo "You might need to add ${HOME}/go/bin to your PATH"
-  echo
-  exit 1
-fi
-
 PGBOUNCER_EXPORTER_DIR="$(pwd)/pgbouncer_exporter-${PGBOUNCER_EXPORTER_VERSION}"
 readonly  PGBOUNCER_EXPORTER_DIR
 
 # Needs to be set for alpine images to run net package of GO
-export CGO_ENABLED=0
 rm -rf "$(pwd)/pgbouncer_exporter*"
 mkdir -pv "${PGBOUNCER_EXPORTER_DIR}"
 
@@ -80,17 +46,17 @@ curl -L "https://github.com/jbub/pgbouncer_exporter/archive/v${PGBOUNCER_EXPORTE
 
 cd "${PGBOUNCER_EXPORTER_DIR}"
 
-"${GO_BIN}" get ./...
-"${GO_BIN}" build
+docker run --rm -e CGO_ENABLED=0 -v "$PWD":/usr/src/myapp -w /usr/src/myapp golang:${EXPECTED_GO_VERSION} go build -v
 
 tag="${DOCKERHUB_USER}/${DOCKERHUB_REPO}:airflow-pgbouncer-exporter-${AIRFLOW_PGBOUNCER_EXPORTER_VERSION}-${PGBOUNCER_EXPORTER_VERSION}"
 
+cd ..
 docker build . \
     --pull \
     --build-arg "PGBOUNCER_EXPORTER_VERSION=${PGBOUNCER_EXPORTER_VERSION}" \
     --build-arg "AIRFLOW_PGBOUNCER_EXPORTER_VERSION=${AIRFLOW_PGBOUNCER_EXPORTER_VERSION}"\
     --build-arg "COMMIT_SHA=${COMMIT_SHA}" \
-    --build-arg "GO_VERSION=${current_go_version}" \
+    --build-arg "GO_VERSION=${EXPECTED_GO_VERSION}" \
     --tag "${tag}"
 
 docker push "${tag}"


[airflow] 01/03: Fix user in helm chart pgbouncer deployment (#11143)

Posted by po...@apache.org.
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 6359b7e2e2748065caa7227eeccc8262325d5299
Author: Ruben Laguna <ru...@gmail.com>
AuthorDate: Fri Sep 25 12:06:30 2020 +0200

    Fix user in helm chart pgbouncer deployment (#11143)
    
    (cherry picked from commit 1f0a7857f283bbdecac51e67f4d76f81c87ed45d)
---
 chart/templates/pgbouncer/pgbouncer-deployment.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chart/templates/pgbouncer/pgbouncer-deployment.yaml b/chart/templates/pgbouncer/pgbouncer-deployment.yaml
index 08712a7..8a79e65 100644
--- a/chart/templates/pgbouncer/pgbouncer-deployment.yaml
+++ b/chart/templates/pgbouncer/pgbouncer-deployment.yaml
@@ -69,7 +69,7 @@ spec:
           command:
             - pgbouncer
             - -u
-            - pgbouncer
+            - nobody
             - /etc/pgbouncer/pgbouncer.ini
           resources:
 {{ toYaml .Values.pgbouncer.resources | indent 12 }}


[airflow] 03/03: Update to latest version of pbgouncer-exporter (#11150)

Posted by po...@apache.org.
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 f74beddaa0c47c11bc81c59c3902d9f98fcbba4f
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Fri Sep 25 18:55:26 2020 +0200

    Update to latest version of pbgouncer-exporter (#11150)
    
    There was a problem with Mac version of pgbouncer exporter
    created and released previously. This commit releases the
    latest version making sure that Linux Go is used to build
    the pgbouncer binary.
    
    (cherry picked from commit c65d46634cb9169dfeca546ab1bdcfec28a6a1b5)
---
 chart/dockerfiles/pgbouncer-exporter/build_and_push.sh | 2 +-
 chart/values.yaml                                      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/chart/dockerfiles/pgbouncer-exporter/build_and_push.sh b/chart/dockerfiles/pgbouncer-exporter/build_and_push.sh
index da204b6..308497e 100755
--- a/chart/dockerfiles/pgbouncer-exporter/build_and_push.sh
+++ b/chart/dockerfiles/pgbouncer-exporter/build_and_push.sh
@@ -24,7 +24,7 @@ readonly DOCKERHUB_REPO
 PGBOUNCER_EXPORTER_VERSION="0.5.0"
 readonly PGBOUNCER_EXPORTER_VERSION
 
-AIRFLOW_PGBOUNCER_EXPORTER_VERSION="2020.09.05"
+AIRFLOW_PGBOUNCER_EXPORTER_VERSION="2020.09.25"
 readonly AIRFLOW_PGBOUNCER_EXPORTER_VERSION
 
 EXPECTED_GO_VERSION="1.15.1"
diff --git a/chart/values.yaml b/chart/values.yaml
index 5c2ee4d..ba7a01e 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -88,7 +88,7 @@ images:
     pullPolicy: IfNotPresent
   pgbouncerExporter:
     repository: apache/airflow
-    tag: airflow-pgbouncer-exporter-2020.09.05-0.5.0
+    tag: airflow-pgbouncer-exporter-2020.09.25-0.5.0
     pullPolicy: IfNotPresent
 
 # Environment variables for all airflow containers