[CI] Fix flaky prod:grpc/core/master/linux/grpc_docker_build - Add retry to ccache download#42180
[CI] Fix flaky prod:grpc/core/master/linux/grpc_docker_build - Add retry to ccache download#42180asheshvidyut wants to merge 4 commits into
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request improves the reliability of Docker image builds by incorporating --fail and --retry flags into curl commands for ccache downloads and updates numerous Docker image versions and hashes. The review feedback recommends adding the --retry-connrefused flag to these curl commands to further mitigate transient network failures during the build process.
| # Install ccache from source since ccache 3.x packaged with most linux distributions | ||
| # does not support Redis backend for caching. | ||
| RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.11.3/ccache-4.11.3.tar.gz \ | ||
| RUN curl -sSL --fail --retry 5 -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.11.3/ccache-4.11.3.tar.gz \ |
There was a problem hiding this comment.
To further improve the robustness of the download against transient network issues, consider adding the --retry-connrefused flag. This ensures that curl also retries when the connection is refused, which is a common occurrence during temporary server outages or network glitches in CI environments.
RUN curl -sSL --fail --retry 5 --retry-connrefused -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.11.3/ccache-4.11.3.tar.gz \
| # does not support Redis backend for caching. | ||
| RUN unset CMAKE_TOOLCHAIN_FILE && unset AS AR CC CPP CXX LD STRIP OBJCOPY \ | ||
| && curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.11.3/ccache-4.11.3.tar.gz \ | ||
| && curl -sSL --fail --retry 5 -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.11.3/ccache-4.11.3.tar.gz \ |
There was a problem hiding this comment.
| # Install ccache from source since ccache 3.x packaged with most linux distributions | ||
| # does not support Redis backend for caching. | ||
| RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \ | ||
| RUN curl -sSL --fail --retry 5 -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \ |
There was a problem hiding this comment.
…try to ccache download (grpc#42180) ### Description Fix flaky tests for the log, looks like a network issue. ``` #18 [15/18] RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.11.3/ccache-4.11.3.tar.gz && tar -zxf ccache.tar.gz && cd ccache-4.11.3 && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. && make -j4 && make install && cd ../.. && rm -rf ccache-4.11.3 ccache.tar.gz #18 11.37 #18 11.37 gzip: stdin: not in gzip format #18 11.37 tar: Child returned status 1 #18 11.37 tar: Error is not recoverable: exiting now #18 ERROR: process "/bin/sh -c curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.11.3/ccache-4.11.3.tar.gz && tar -zxf ccache.tar.gz && cd ccache-4.11.3 && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. && make -j4 && make install && cd ../.. && rm -rf ccache-4.11.3 ccache.tar.gz" did not complete successfully: exit code: 2 ------ ``` Added retry to ccache install. Closes grpc#42180 COPYBARA_INTEGRATE_REVIEW=grpc#42180 from asheshvidyut:fixit/fix-flake 33a66ed PiperOrigin-RevId: 902683742
…try to ccache download (grpc#42180) ### Description Fix flaky tests for the log, looks like a network issue. ``` grpc#18 [15/18] RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.11.3/ccache-4.11.3.tar.gz && tar -zxf ccache.tar.gz && cd ccache-4.11.3 && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. && make -j4 && make install && cd ../.. && rm -rf ccache-4.11.3 ccache.tar.gz grpc#18 11.37 grpc#18 11.37 gzip: stdin: not in gzip format grpc#18 11.37 tar: Child returned status 1 grpc#18 11.37 tar: Error is not recoverable: exiting now grpc#18 ERROR: process "/bin/sh -c curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.11.3/ccache-4.11.3.tar.gz && tar -zxf ccache.tar.gz && cd ccache-4.11.3 && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. && make -j4 && make install && cd ../.. && rm -rf ccache-4.11.3 ccache.tar.gz" did not complete successfully: exit code: 2 ------ ``` Added retry to ccache install. Closes grpc#42180 COPYBARA_INTEGRATE_REVIEW=grpc#42180 from asheshvidyut:fixit/fix-flake 33a66ed PiperOrigin-RevId: 902683742
Description
Fix flaky tests for the log, looks like a network issue.
Added retry to ccache install.