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

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new ff7e7a0dbb Improve version check for kubectl (#24882)
ff7e7a0dbb is described below

commit ff7e7a0dbb28ca66a2520bed569c7ffd5c8a03ee
Author: Gabriel Machado <[email protected]>
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.
---
 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 65f2998a88..708f9e0aec 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 | 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

Reply via email to