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 2022/07/21 14:28:04 UTC

[airflow] 01/22: Improve version check for kubectl (#24882)

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

potiuk pushed a commit to branch v2-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 60c64bcdf150194163e37d129b138859a58b6714
Author: Gabriel Machado <ga...@hotmail.com>
AuthorDate: Wed Jul 6 21:22:03 2022 +0200

    Improve version check for kubectl (#24882)
    
    kubectl 1.24.0 added a warning that broke the version detection.
    It leads to redownload kubectl everytime we run a breeze-legacy command.
    
    (cherry picked from commit ff7e7a0dbb28ca66a2520bed569c7ffd5c8a03ee)
---
 scripts/ci/libraries/_kind.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/ci/libraries/_kind.sh b/scripts/ci/libraries/_kind.sh
index 875cd18a76..4ae6fd3383 100644
--- a/scripts/ci/libraries/_kind.sh
+++ b/scripts/ci/libraries/_kind.sh
@@ -69,7 +69,7 @@ function kind::make_sure_kubernetes_tools_are_installed() {
     kubectl_url="https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/${system}/${machine}/kubectl"
     if [[ -f "${KUBECTL_BINARY_PATH}" ]]; then
         local downloaded_kubectl_version
-        downloaded_kubectl_version="$(${KUBECTL_BINARY_PATH} version --client=true --short | awk '{ print $3 }')"
+        downloaded_kubectl_version="$(${KUBECTL_BINARY_PATH} version --client --output yaml | grep gitVersion | awk '{ print $2 }')"
         echo "Currently downloaded kubectl version = ${downloaded_kubectl_version}"
     fi
     if [[ ! -f "${KUBECTL_BINARY_PATH}" || ${downloaded_kubectl_version} != "${KUBECTL_VERSION}" ]]; then