From 618f7d66ca0cc0506da277e3da6cc76d7cdc183a Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot Date: Mon, 21 Sep 2026 19:30:24 +0200 Subject: [PATCH] fix(make): fail the protoc download on an HTTP error (#12187) `make protoc` fetched the protoc release with `curl -L` and no `-f`. When GitHub answered with an error, curl saved the error page as protoc.zip and exited 0, and the build then failed at unzip with "cannot find zipfile directory", which points at the archive rather than at the download. This happened for real: GitHub answered a CI cluster with a 504 for release downloads for over an hour, and every backend build that runs `make protogen-go` failed with the unzip message. `-f` makes curl fail on the HTTP status and write nothing, so the error names the real cause. `--retry-all-errors` also retries HTTP errors, which rides out a short blip; a longer outage still fails, now with the right message. Assisted-by: Claude:claude-opus-5 [Claude Code] Signed-off-by: Ettore Di Giacinto Co-authored-by: Ettore Di Giacinto --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cd9d6ee34..e39c5dfa0 100644 --- a/Makefile +++ b/Makefile @@ -576,7 +576,7 @@ protoc: echo "Unsupported OS: $$OS_NAME"; exit 1; \ fi; \ URL=https://github.com/protocolbuffers/protobuf/releases/download/v31.1/$$FILE; \ - curl -L $$URL -o protoc.zip && \ + curl -fsSL --retry 5 --retry-all-errors --retry-delay 5 $$URL -o protoc.zip && \ unzip -j -d $(CURDIR) protoc.zip bin/protoc && rm protoc.zip .PHONY: protogen-go