Skip to content

fix(CI): follow redirects when downloading MinIO client#319

Merged
99Lys merged 1 commit into
dremio:mainfrom
99Lys:fix-minio-client-follow-redirect
May 12, 2026
Merged

fix(CI): follow redirects when downloading MinIO client#319
99Lys merged 1 commit into
dremio:mainfrom
99Lys:fix-minio-client-follow-redirect

Conversation

@99Lys
Copy link
Copy Markdown
Contributor

@99Lys 99Lys commented May 12, 2026

Summary

dl.min.io now responds with HTTP/2 302 redirecting to GitHub Releases for the mc binary, but .github/scripts/install_minio_client.sh used curl -O (which does not follow redirects). The result is that the empty 302 response body (141 bytes) is being saved as the mc binary, chmod +x-ed, and then later steps that invoke mc fail with:

/usr/local/bin/mc: line 1: a: No such file or directory
##[error]Process completed with exit code 1.

This breaks every CI job that depends on MinIO (caching, hooks, functional/adapter/*, etc.).

Fix

Replace curl -O with curl -fLO:

  • -L — follow the 302 redirect to GitHub Releases so the real ~30 MB binary is downloaded.
  • -f — fail the script on any non-2xx HTTP status, so we get a loud failure instead of silently producing an invalid binary if the download URL changes again in the future.

Verification

$ curl -sI https://dl.min.io/client/mc/release/linux-amd64/mc
HTTP/2 302
location: https://github.com/minio/mc/releases/download/RELEASE.2025-08-13T08-35-41Z/...

$ curl -sIL https://dl.min.io/client/mc/release/linux-amd64/mc | tail -2
HTTP/2 200
content-length: 30535864

Test Plan

  • CI on this PR should pass the MinIO install step (was the failure point on recent PRs).

🤖 Generated with Claude Code

dl.min.io now responds with an HTTP 302 redirect to GitHub Releases
for the mc binary. curl -O does not follow redirects, so the install
script was saving the empty redirect response (141 bytes) as the
mc binary and chmod +x-ing it. Subsequent steps that invoke mc fail
with `/usr/local/bin/mc: line 1: a: No such file or directory`.

Add -L so curl follows the redirect, and -f so it fails the script
loudly if the download returns a non-2xx status instead of silently
producing an invalid binary.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@99Lys 99Lys changed the title CI: follow redirects when downloading MinIO client fix(CI): follow redirects when downloading MinIO client May 12, 2026
@99Lys 99Lys merged commit eac8389 into dremio:main May 12, 2026
18 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants