Fix CI build failures and move actions off the Node.js 20 runtime - #1081
Conversation
PrimeCrystal/solution_2 built on debian:11. Bullseye has reached the end of its LTS window and packages have been dropped from the mirrors, so `apt-get install curl` now fails with 404s before Crystal is reached at all. Bumped to debian:13 with Crystal 1.21. Crystal 1.14 cannot be used on trixie because it depends on libpcre3-dev, which Debian 13 dropped in favour of PCRE2. All five implementations still report Valid: true. PrimeMojo/solution_1 installed the Mojo toolchain unpinned. Mojo 26.4 removed `fn`, breaking the build. This solution has required repeated source fixes to track Mojo's breaking changes; pinning the toolchain stops that from recurring. Pinned to 26.3.0, the newest release the current source compiles on. PrimePHP/solution_1 failed in the same run on a transient Docker Hub 502 while resolving php:8.1.7-cli. It builds correctly and is unchanged.
GitHub no longer supports the Node.js 20 action runtime. Five of the actions in use ran on node20: actions/checkout v4 -> v7 docker/setup-qemu-action v3 -> v4 docker/setup-buildx-action v3 -> v4 docker/login-action v3 -> v4 docker/build-push-action v6 -> v7 The four docker action majors are runtime bumps only, with no input changes. checkout v7 blocks fork checkout for pull_request_target and workflow_run, neither of which this workflow uses; no other behaviour relevant here changed. The checkout in collect-solutions was already on v6, which is node24. It is moved to v7 so both jobs use one version. jbergstroem/hadolint-gh-action is a composite action with no Node runtime, and is unchanged.
|
@GordonBGood @Evan-LucasCurrie heads-up: this PR changes the Dockerfiles of your solutions to get them building in CI again. Neither source file is touched. @GordonBGood, Crystal solution_2 built on @Evan-LucasCurrie, Mojo solution_1 installed the toolchain unpinned, and Mojo 26.4 removed If you want that solution on a current Mojo, the pin and the source have to move together, since No action needed from either of you otherwise. |
The debian:13 bump fixed the base image, but the solution still installed Crystal from the openSUSE build service repo via crystal-lang.org's install script. download.opensuse.org redirects to regional mirrors that are not always in sync, so the build fails wherever the assigned mirror lacks the package: E: Failed to fetch http://mirror.aardsoft.fi/opensuse/repositories/ devel:/languages:/crystal/Debian_13/amd64/crystal1.21_1.21.0-1+1.2_amd64.deb 404 Not Found That is luck of routing rather than anything reproducible, and it is the same failure mode regardless of which Debian release is targeted. Using crystallang/crystal:1.21.0 removes apt, curl, the install script and the mirror dependency entirely. The image is multi-arch, so this also drops no architecture support. Source unchanged; all five implementations report Valid: true with 78498.
|
@GordonBGood correction to my note above: the fix changed after I posted it. The Which mirror you get decides whether the build works, and that would have recurred on any Debian release. So solution_2 now builds on Your source is still untouched, and all five implementations report |
Description
Three solutions failed CI on the current
drag-racetip. Two are genuinely broken and are fixed here; the third was transient. This also moves the workflow's actions off the unsupported Node.js 20 runtime.Build failures
PrimeCrystal/solution_2 - stale base image and unreliable package mirrors
Two separate problems, found one after the other.
The solution built on
debian:11. Bullseye has reached the end of its LTS window and packages have been dropped from the mirrors, so the build failed duringapt-get install curl, before Crystal was reached at all:Moving to
debian:13fixed that, and built cleanly locally. It then failed in CI anyway, for a different reason:The solution installed Crystal from the openSUSE build service repo via
crystal-lang.org's install script.download.opensuse.orgredirects to regional mirrors that are not always in sync, so whether the build works depends on which mirror the runner is assigned. That is not specific to trixie and would recur on any Debian release.This now builds on
crystallang/crystal:1.21.0, the Crystal project's own image, which removes apt, curl, the install script and the mirror dependency entirely. The image is multi-arch, so no architecture support is lost. CONTRIBUTING points at a language's official image first where one exists, which this is.Source unchanged. All five implementations still validate:
All five report
Count1: 78498 Count2: 78498 Valid: true, built with--no-cache.PrimeMojo/solution_1 - unpinned toolchain
The Dockerfile installed the Mojo toolchain unpinned, so it always pulled the latest release. Mojo 26.4 removed
fn:This solution has needed repeated source fixes to track Mojo's breaking changes. Rather than chase another one, the toolchain is now pinned. I tested the range to find the working window:
function effect 'raises' was already specified'fn' has been removed(34 occurrences)Pinned to 26.3.0, the newest release the current source compiles on. The source is untouched, and output is unchanged in form:
Moving past 26.3 requires
fnto becomedefin the source. That is a semantic change, so it is left to the contributor rather than folded into a build fix.PrimePHP/solution_1 - transient, not changed
This failed in the same run, but on a Docker Hub outage rather than anything in the solution:
It is unchanged, and has since passed CI on this branch.
Action runtimes
GitHub no longer supports the Node.js 20 action runtime. Five of the actions in use ran on node20:
actions/checkout(build job)docker/setup-qemu-actiondocker/setup-buildx-actiondocker/login-actiondocker/build-push-actionAll five now resolve to
using: node24. The four docker action majors are runtime bumps only, with no input changes;checkoutv7 blocks fork checkout forpull_request_targetandworkflow_run, neither of which this workflow uses.The
checkoutincollect-solutionswas already on v6, which is node24 - it is moved to v7 so both jobs use one version.jbergstroem/hadolint-gh-actionis a composite action with no Node runtime, so it is unchanged.Note that the docker action majors require Actions Runner v2.327.1 or later. GitHub-hosted runners keep the runner binary current, so this should be satisfied.
Notes
Both changed Dockerfiles pass hadolint against
config/hadolint.yml.PrimePHP/solution_1pinsphp:8.1.7-cliand PHP 8.1 is past end of life, but that is a relevance question rather than a build failure and is deliberately not addressed here. Nobuild-noflags were added.