Repository navigation
Only remove the preinstalled JDKs that are installed - #9952
Merged
Merged
Conversation
The ubuntu-26.04 runner image has Temurin 11, 17, 21 and 25, but not 8. On it, "apt remove temurin-8-jdk temurin-11-jdk temurin-17-jdk" fails with "Unable to locate package temurin-8-jdk" and removes none of them, so every job with that step fails at the start. ubuntu-latest already resolves to ubuntu-26.04 for some repositories. The step now removes only the listed JDKs that dpkg knows about: 8, 11 and 17 on ubuntu-24.04, as before, and 11 and 17 on ubuntu-26.04.
Contributor
Author
|
With this change, the whole CI passed on my fork, where The Linux jobs I checked all got ubuntu-26.04. In |
headius
approved these changes
Oct 29, 2026
Member
There was a problem hiding this comment.
Sigh, the things we must do.
This is approved and makes sense to merge into 10.0, but master moved much of this duplicate workflow to a separate local action (@sampokuokkanen). Perhaps we should backport that as well to avoid future changes to the 10.0 workflows being impossible to merge to master.
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.
ubuntu-latestalready resolves to the ubuntu-26.04 runner image for some repositories, including my fork of this one. There, every Linux job inci.ymlfails at its first step:For #9945's branch, the run on my fork got ubuntu-26.04 and failed at that step. The same jobs here got ubuntu-24.04 and passed.
ubuntu-26.04 has Temurin 11, 17, 21 and 25, but not 8, and apt removes nothing when it doesn't know one of the packages. The step removes the JDKs older than 21 because some subprocesses of the build fall back on the system Java instead of the one from
setup-java, see actions/setup-java#701. So ignoring the error wouldn't help: 11 and 17 would stay installed.This PR removes only the listed JDKs that dpkg knows about: 8, 11 and 17 on ubuntu-24.04, as before, and 11 and 17 on ubuntu-26.04. Otherwise, these jobs will fail here too once
ubuntu-latestmoves to ubuntu-26.04 for this repository.In an
ubuntu:26.04container, with two installed packages standing in for the JDKs, the current command exits with 100 and removes nothing. The new one removes both and exits 0, and also exits 0 when none of the packages are installed. actionlint reports the same findings forci.ymlbefore and after.masterhas the same step in two jobs.