-
Notifications
You must be signed in to change notification settings - Fork 752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup Java does not ensure that sbt
is installed on Ubuntu 24
#712
Comments
Hello @jsoref, |
We are facing the same issue |
Hi @jsoref, You're absolutely right that sbt is currently not included in Ubuntu 24.04. The Runner Image team has made cuts to the list of included packages in order to maintain our SLA for free disk space. More details here: actions/runner-images#10636. Since sbt is not part of the runner image, CI workflows were failing, which is why the workflows have been updated. The setup-java action provides the environment for sbt, and including sbt by default depends on the runner image configuration. You can still install sbt manually using
Let me know if it helps resolve your problem. |
first, your sample code is buggy and you really shouldn't suggest it -- the third, this action is designed to support sbt -- each consumer of this action shouldn't have to try to avoid making the mistakes that you included in your sample code (or the various other mistakes that may be present or properly maintain it for when the key for ubuntu changes). Or the various other problems entailed here. |
The maintainers of sbt have made this action available: https://github.com/sbt/setup-sbt cc @eed3si9n So all that users need to do is add |
sbt is no longer included by default in the ubuntu 24 runner https://github.com/sbt/setup-sbt actions/setup-java#712 (comment)
* fix github actions runner sbt is no longer included by default in the ubuntu 24 runner https://github.com/sbt/setup-sbt actions/setup-java#712 (comment) * forgot a few places * temporarily disable citation action Error: Rscript: command not found #4069 * try to reenable citation action and configure to install R
Hi @jsoref , The double quotes "" I used in the original sample code were indeed incorrect, as they would evaluate to empty strings. I appreciate you pointing that out. Here’s the corrected command:
You're right that the setup-java action is designed to support sbt out of the box, and consumers shouldn't have to manually manage dependencies like sbt for typical use cases. The issue here is that sbt is not included in the default Ubuntu 24.04 runner image, and because of this, CI workflows are failing. The Runner Image team made this change to reduce disk usage. The workaround I provided was meant to help in cases where users are facing this problem, but I do agree it’s not an ideal long-term solution. |
It doesn't look like you've fixed the doubled quotes. You did fix the apt-key things, which is nice although that's not an alternative command I've seen before... |
I agree it would make a lot of sense for setup-java to pick this up now that it isn't in the ubuntu-latest anymore. |
I recommend using setup-sbt, or if setup-java folks are considering to make
|
Description:
Notice of breaking changes for GitHub Actions warned that certain packages would not be present in Ubuntu 24.04, this included
sbt
.This was tripped on by this repository and worked around by pinning backwards (from
ubuntu-latest
toubuntu-22.04
):Unfortunately, anyone who legitimately expected "setup-java" to set up java for use with sbt which is listed as a supported feature of the actions/setup-java repository:
setup-java/README.md
Line 16 in 7a6d8a8
... doesn't get a working sbt environment.
Task version:
Specify the task version
actions/setup-java@v4
, as in:https://github.com/GarnerCorp/build-actions/blob/f3a79ac52d53e8b2218381ae5dd240619ed9eacf/scala/action.yml#L129-L134
Platform:
Runner type:
Repro steps:
runs-on: ubuntu-latest
orruns-on: ubuntu-24.04
uses: actions/setup-java@v4
oruses: GarnerCorp/build-actions/scala@0cc885d8117f6bb9c89dc99a34f5edebeac115cf
sbt
, runsbt
Expected behavior:
sbt
should workActual behavior:
sbt: not found
The text was updated successfully, but these errors were encountered: