XComp commented on code in PR #23528: URL: https://github.com/apache/flink/pull/23528#discussion_r1366863438
########## flink-end-to-end-tests/test-scripts/common_kubernetes.sh: ########## @@ -39,8 +39,12 @@ function setup_kubernetes_for_linux { if ! [ -x "$(command -v kubectl)" ]; then echo "Installing kubectl ..." local version=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt) - curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$version/bin/linux/$arch/kubectl && \ - chmod +x kubectl && sudo mv kubectl /usr/local/bin/ + download_kubectl_url="https://storage.googleapis.com/kubernetes-release/release/$version/bin/linux/$arch/kubectl" + if ! retry_times 3 5 "curl -Lo kubectl ${download_kubectl_url}"; then Review Comment: Could we combine the retry count (3) and backoff parameter (5) into variables that are used by all the download blocks? Essentially we could use `MINIKUBE_START_RETRIES` and `MINIKUBE_START_BACKOFF` (but that would require renaming). WDYT? ########## flink-end-to-end-tests/test-scripts/common_kubernetes.sh: ########## @@ -60,7 +64,12 @@ function setup_kubernetes_for_linux { local crictl_version crictl_archive crictl_version="v1.24.2" crictl_archive="crictl-$crictl_version-linux-${arch}.tar.gz" - wget -nv "https://github.com/kubernetes-sigs/cri-tools/releases/download/${crictl_version}/${crictl_archive}" + download_circtl_url="https://github.com/kubernetes-sigs/cri-tools/releases/download/${crictl_version}/${crictl_archive}" + if ! retry_times 3 5 "wget -nv ${download_circtl_url}"; then Review Comment: can you double-check that wget works properly (i.e. returns an non-zero exit code) if accessing the website fails? ...to make the retry logic work. ########## flink-end-to-end-tests/test-scripts/common_kubernetes.sh: ########## @@ -39,8 +39,12 @@ function setup_kubernetes_for_linux { if ! [ -x "$(command -v kubectl)" ]; then echo "Installing kubectl ..." local version=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt) - curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$version/bin/linux/$arch/kubectl && \ - chmod +x kubectl && sudo mv kubectl /usr/local/bin/ + download_kubectl_url="https://storage.googleapis.com/kubernetes-release/release/$version/bin/linux/$arch/kubectl" + if ! retry_times 3 5 "curl -Lo kubectl ${download_kubectl_url}"; then Review Comment: ```suggestion if ! retry_times 3 5 "curl --fail -Lo kubectl ${download_kubectl_url}"; then ``` Looks like this PR has the same issue like PR #23497 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org