Repository navigation
Suggest the latest patch release when a version is unavailable - #949
Open
CyberNativeAI wants to merge 1 commit into
Open
CyberNativeAI wants to merge 1 commit into
CyberNativeAI wants to merge 1 commit into
Conversation
Newer runner images such as ubuntu-26.04 only have builds of the latest patch release of each series, so an exact version like 3.4.2 from .ruby-version fails with a 404 and only a link to request the build. On a 404, check whether the latest release of the same series exists for the platform. If it does, name it and the short version that always picks it. If it does not, say so and suggest a newer version or an older runner image. If that check fails for another reason, keep the previous message. Also document this in the README.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the comment in #943 that the latest-patch-only policy "should be better documented though, including in this error message".
When
ubuntu-latestmoves toubuntu-26.04(rolling out from October 19, see actions/runner-images#14748), workflows onubuntu-latestthat pin an older patch version such as3.4.2inruby-versionor.ruby-version, or use a series older than 3.2, get this error:This PR keeps the error, but on a 404 it checks with one HEAD request whether the latest release of the same series exists for the platform, and says what to do:
If the HEAD request fails or returns anything other than 200 or 404, the previous message is shown unchanged.
headversions and series without a stable release also keep the previous message. The README gets a short note under Supported Platforms.Testing: we ran
dist/index.jsunder Node 24.21.0 in plainubuntu:26.04andubuntu:24.04containers with an empty tool cache, not on a hosted runner.3.4.2,3.1.4andjruby-9.4.3.0on 26.04 give the messages above (for JRuby it suggests'jruby-9.4.15.0'or'jruby-9.4').3.1resolves to 3.1.7, so its first line isruby-3.1.7 is the latest 3.1.x release.instead.'3.4'installs 3.4.11 on 26.04, and'jruby-9.4'downloads 9.4.15.0.3.4.2still installs on 24.04, and3.4.11on 26.04.fetchstubbed to throw, or to return 500, the message is the previous one.yarn run packageon the patched source reproduces the committeddist/index.js.This PR was prepared with AI assistance; we reviewed and tested it before opening it.