diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-10-23 05:28:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-23 05:28:27 +0200 |
| commit | 1ea34fb463b4472d674576b1d310cd44ce40760b (patch) | |
| tree | 26f7684ad4ce8f838212ea1e6c9d9149c45b9ede /src/ci/docker | |
| parent | 270c800d358ee47f3aee6fe1e2ec4dc92616d55f (diff) | |
| parent | 3e6a69534f52b08057d18643b62d0f926b80909f (diff) | |
| download | rust-1ea34fb463b4472d674576b1d310cd44ce40760b.tar.gz rust-1ea34fb463b4472d674576b1d310cd44ce40760b.zip | |
Rollup merge of #90122 - rusticstuff:ci_curl_max_time, r=Mark-Simulacrum
CI: make docker cache download and `docker load` time out after 10 minutes Might help to prevent timeouts we have been seeing: * https://github.com/rust-lang-ci/rust/runs/3946294286?check_suite_focus=true#step:25:23 * https://github.com/rust-lang-ci/rust/runs/3956799200?check_suite_focus=true#step:25:22 * https://github.com/rust-lang-ci/rust/runs/3962928502?check_suite_focus=true#step:25:23 * https://github.com/rust-lang-ci/rust/runs/3967892291?check_suite_focus=true * https://github.com/rust-lang-ci/rust/runs/3971202204?check_suite_focus=true If the download or loading the images into docker times out the CI will still continue and rebuild the docker image from scratch.
Diffstat (limited to 'src/ci/docker')
| -rwxr-xr-x | src/ci/docker/run.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh index e42b4748fdc..b1dacf79d26 100755 --- a/src/ci/docker/run.sh +++ b/src/ci/docker/run.sh @@ -70,8 +70,13 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then echo "Attempting to download $url" rm -f /tmp/rustci_docker_cache set +e - retry curl -y 30 -Y 10 --connect-timeout 30 -f -L -C - -o /tmp/rustci_docker_cache "$url" - loaded_images=$(docker load -i /tmp/rustci_docker_cache | sed 's/.* sha/sha/') + retry curl --max-time 600 -y 30 -Y 10 --connect-timeout 30 -f -L -C - \ + -o /tmp/rustci_docker_cache "$url" + echo "Loading images into docker" + # docker load sometimes hangs in the CI, so time out after 10 minutes with TERM, + # KILL after 12 minutes + loaded_images=$(/usr/bin/timeout -k 720 600 docker load -i /tmp/rustci_docker_cache \ + | sed 's/.* sha/sha/') set -e echo "Downloaded containers:\n$loaded_images" fi |
