Skip to content

fix: follow dl.min.io redirects when downloading mc; move builds to monthly - #8

Merged
Harsh-2002 merged 3 commits into
mainfrom
fix/mc-download-redirect
Aug 26, 2026
Merged

fix: follow dl.min.io redirects when downloading mc; move builds to monthly#8
Harsh-2002 merged 3 commits into
mainfrom
fix/mc-download-redirect

Conversation

@Harsh-2002

Copy link
Copy Markdown
Owner

Fixes 18 consecutive scheduled-build failures (2026-04-27 → 2026-08-24), every one minisign: invalid signature on the same RUN step.

Root cause

dl.min.io no longer serves binaries directly — it 302-redirects to GitHub Releases. The mc download used curl -s -q with no -L, so curl saved the 149-byte HTML redirect stub as both /usr/bin/mc and /usr/bin/mc.minisig, and minisign correctly rejected the garbage.

The signing key never rotated. Verified before changing anything:

  • Key ID in the real signature (f1e59af5b621d02f) matches the pubkey pinned in the Dockerfile.
  • With -L, both the file signature and the global signature verify against that exact pubkey — on amd64 and arm64.

Timing corroborates: minio/minio was archived 2026-04-24, between the last green run (04-20) and the first red one (04-27).

Changes

  • curl -s -qcurl -fsSL. -L is the fix; -f makes any future HTTP error fail the build loudly instead of silently saving an error page over the binary.
  • Shallow-clone minio/minio — archived upstream, so full history is never needed.
  • Weekly → monthly schedule. Every input is frozen: minio/minio archived (no code change since 2025-10-24), console + mds refs pinned, mc frozen at RELEASE.2025-08-13. The only moving part is alpine:latest, so weekly rebuilds produced an identical image.
  • Build 1.7.3 had no schedule at all and had not rebuilt since 2026-02-17 — its base layer was rotting. Now monthly too, staggered a day apart.
  • Registry build cache instead of type=gha (GitHub evicts unused caches after 7 days, leaving every monthly run cold). Adds two buildcache-* tags to Docker Hub.
  • Dropped dead packages: write; added concurrency cancel-in-progress.
  • Docs: CLAUDE.md described a workflow file that does not exist (docker-build-push.yml), a daily cron, and minio/object-browser as the UI source — that repo has been deleted upstream.

Validation

This PR runs Build Latest with push: false, which exercises the full multi-arch build including the mc download and minisign verification — without publishing.

Not addressed here (warnings, not failures): the five actions are each one major behind (Node 20 deprecation), node:18-alpine is past EOL, and native ubuntu-24.04-arm runners would cut build time more than caching does.

…onthly

The scheduled build has failed on every run since 2026-04-27 (18 consecutive
failures, all "minisign: invalid signature").

dl.min.io no longer serves binaries directly - it now 302-redirects to GitHub
Releases. The mc download used `curl -s -q` with no -L, so curl wrote the
149-byte HTML redirect stub to /usr/bin/mc and /usr/bin/mc.minisig and minisign
correctly rejected it. The signing key never rotated: the key ID in the real
signature (f1e59af5b621d02f) still matches the pubkey pinned in the Dockerfile,
and both the file and global signatures verify against it once -L is used.

- curl -s -q -> curl -fsSL. -L is the fix; -f makes any future HTTP error fail
  the build loudly instead of silently saving an error page over the binary.
- Shallow-clone minio/minio. It is archived upstream (read-only, last code
  change 2025-10-24), so full history is never needed.

Also move the schedule from weekly to monthly. Every build input is frozen:
minio/minio is archived, the console and mds refs are pinned, and mc has not
been republished since RELEASE.2025-08-13. The only thing a rebuild can pick up
is an Alpine base-image security patch, so weekly rebuilds produced an identical
image. Build 1.7.3 had no schedule at all and had not rebuilt since 2026-02-17;
it now gets monthly patches too, staggered a day apart.

Switch to a registry build cache rather than type=gha, since GitHub evicts
unused caches after 7 days and would leave every monthly run cold.

Docs corrected: CLAUDE.md described a workflow file that does not exist
(docker-build-push.yml), a daily cron, and minio/object-browser as the UI
source - that repo has been deleted upstream.
Cairn is a self-hosted, S3-compatible object store written in Rust with the
console built into the binary. Framed against why this image exists in the
first place, and flagged as active development / not production-ready.
PR build hit a transient proxy.golang.org failure 248s into the go build:
  go-oidc/v3@v3.14.1: read ".../v3.14.1.zip": stream error: INTERNAL_ERROR

One dropped HTTP/2 stream should not kill a multi-arch build that takes an
hour. Pre-fetch modules in a retry loop before building.
@Harsh-2002
Harsh-2002 merged commit af5c6b7 into main Aug 26, 2026
1 check passed
@Harsh-2002
Harsh-2002 deleted the fix/mc-download-redirect branch August 26, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant