From 0fb95f95d2af7bcc2529f896fec9904b3357b580 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 21 Sep 2022 14:33:18 -0600 Subject: CI: only make install.tools when needed Reintroduce .install.foo targets into Makefile, and invoke only the bare-minimum ones needed for each individual CI step in setup_environment.sh. Also add a retry to the golangci-lint curl, in hopes of dealing with network flakes. And remove the -f (fail) because it produces unhelpful logs. Reason: saw about 25% CI flakes yesterday due to the golangci-lint fetch, something about a timeout, and this was especially frustrating because none of the steps actually needed lint. Quick reminder: avoid network fetches unless absolutely necessary. Fixes: #15892 Signed-off-by: Ed Santiago --- hack/install_golangci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hack') diff --git a/hack/install_golangci.sh b/hack/install_golangci.sh index 896d59901..29d925666 100755 --- a/hack/install_golangci.sh +++ b/hack/install_golangci.sh @@ -6,7 +6,7 @@ die() { echo "${1:-No error message given} (from $(basename $0))"; exit 1; } function install() { echo "Installing golangci-lint v$VERSION into $BIN" - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v$VERSION + curl -sSL --retry 5 https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v$VERSION } # Undocumented behavior: golangci-lint installer requires $BINDIR in env, -- cgit v1.2.3-54-g00ecf