Skip to content

ci: download Maven from the Apache archive - #78

Merged
wesnel merged 1 commit into
mainfrom
ci-maven-download
Nov 13, 2026
Merged

wesnel merged 1 commit into
mainfrom
ci-maven-download

Conversation

@wesnel

@wesnel wesnel commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

The Build Ngrok Java (glibc 2.28) CI job fails on main before it builds anything:

sha512sum: WARNING: 1 computed checksum did NOT match
maven.tar.gz: FAILED

dlcdn.apache.org now answers 404 for Maven 3.9.12. curl -sL saved that error page as maven.tar.gz, so the step failed at the checksum rather than at the download. Both ci.yml and release-perform.yml now download Maven from archive.apache.org, which keeps every release, with the same pinned SHA-512. curl also takes -f and -S, so an HTTP error now fails the download step and prints why.

#77 is stacked on this.

Validation

  • https://dlcdn.apache.org/maven/maven-3/3.9.12/binaries/apache-maven-3.9.12-bin.tar.gz returns HTTP 404.
  • The archive.apache.org tarball's SHA-512 equals both Apache's published .sha512 for it and the value pinned in the workflows.

Weak spots, assumptions and decisions

  • release-perform.yml gets the same change but only runs on a release, so this pull request's CI does not exercise it.
  • Assumes archive.apache.org stays reachable from GitHub runners and keeps old releases; if it does not, the download step now fails with the HTTP error. The alternative not taken is bumping Maven to a version dlcdn serves today, which would break again on the next Maven release.
  • Adding -f is a choice beyond the URL fix; without it, a future 404 again surfaces as a checksum mismatch.

Reverting

A two-way door: it changes only how CI downloads Maven. Reverting it brings back the 404 and the failing job; nothing else is left behind.

@wesnel
wesnel changed the base branch from nix-drop-apple-sdk to main November 11, 2026 21:59
dlcdn.apache.org serves only current releases and now answers 404 for
Maven 3.9.12. curl -sL saved that error page as maven.tar.gz, so the
step failed at the checksum instead of at the download. archive.apache.org
keeps every release, and its 3.9.12 tarball matches the pinned SHA-512.

curl now takes -f and -S, so an HTTP error fails the download and is
printed.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the Maven download updates in the CI and release workflows.

No open issues 🎉

What changed in this PR

Fixes Maven downloads in CI and release workflows by using the Apache archive, avoiding failures when the pinned release is removed from the download CDN.

Changes:

  • Switches both workflows to archive.apache.org, preserving Maven 3.9.12 and its pinned SHA-512 checksum.
  • Adds curl’s -f and -S flags so HTTP errors fail the download immediately and display an error message.
File Description
.github/​workflows/​release-perform.yml Updates the container Maven download URL and error handling for releases.
.github/​workflows/​ci.yml Applies the same download fix to the CI build.

Review effort: Balanced

@wesnel
wesnel marked this pull request as ready for review November 12, 2026 00:09
@joshbottelberghe joshbottelberghe self-assigned this Nov 12, 2026

@joshbottelberghe joshbottelberghe left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Checked the archive URL serves 3.9.12 and its .sha512 matches the pin; dlcdn is 404. CI green at c926c6f.

Optional: Maven Central has the same tarball and hash (repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/), CDN-backed, if the archive's rate limit ever bites.

@wesnel
wesnel merged commit 1a595a3 into main Nov 13, 2026
6 checks passed
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.

3 participants