Skip to content
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@v4 setup for sbt failing on Linux with sbt: command not found #694

Closed
3 tasks
dnkanga opened this issue Oct 11, 2024 · 6 comments
Closed
3 tasks
Assignees
Labels
bug Something isn't working

Comments

@dnkanga
Copy link

dnkanga commented Oct 11, 2024

Description:
This seemingly broke overnight, i'm attempting to setup the build with this

jobs:
  unit-test-with-coverage:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK 11
        uses: actions/setup-java@v4
        with:
          java-version: '11'
          distribution: 'adopt'

      - name: Compile and run tests
        run: sbt clean coverage test coverageReport

and the build is failing with

Run sbt clean coverage test coverageReport
  sbt clean coverage test coverageReport
  shell: /usr/bin/bash -e {0}
  env:
    GITHUB_TOKEN: ***
    ORG_TOKEN: ***
    JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/11.0.24-8/x64
    JAVA_HOME_11_X64: /opt/hostedtoolcache/Java_Adopt_jdk/11.0.24-8/x64
/home/runner/work/_temp/b7c25d22-b1b1-4c67-b34a-c29a4ed01426.sh: line 1: sbt: command not found
Error: Process completed with exit code 127.

Platform:

  • [ X] Ubuntu
  • macOS
  • Windows

Runner type:

  • [ X] Hosted
  • Self-hosted
@dnkanga dnkanga added bug Something isn't working needs triage labels Oct 11, 2024
@dnkanga dnkanga changed the title setup-java@v4 setup for sbt failing on Linux with line 1: sbt: command not found setup-java@v4 setup for sbt failing on Linux with line 1: sbt: command not found Oct 11, 2024
@dnkanga dnkanga changed the title setup-java@v4 setup for sbt failing on Linux with line 1: sbt: command not found setup-java@v4 setup for sbt failing on Linux with sbt: command not found Oct 11, 2024
@marvinborner
Copy link

marvinborner commented Oct 12, 2024

I also have this issue. This is likely because of the ubuntu-latest update which no longer includes sbt by default.

Also using the sbt/setup-sbt action fixes it.

tjmw added a commit to guardian/support-service-lambdas that referenced this issue Oct 14, 2024
It turns out SBT isn't available in the latest ubuntu image:
actions/setup-java#694
tjmw added a commit to guardian/support-service-lambdas that referenced this issue Oct 14, 2024
It turns out SBT isn't available in the latest ubuntu image:
actions/setup-java#694
tjmw added a commit to guardian/support-service-lambdas that referenced this issue Oct 14, 2024
Fixes the build. It turns out SBT isn't available in the latest ubuntu image:
actions/setup-java#694 so we've had failures: sbt: command not found.
@dnkanga
Copy link
Author

dnkanga commented Oct 14, 2024

@tjmw when will the fix for this be rolled out?

@aparnajyothi-y
Copy link
Contributor

Hello Everyone,

Thank you for creating this issue. There is already an issue raised under runner-images. Here are my findings:

  • Previously, the ubuntu-latest tag was associated with the ubuntu-22.04 image. It is now associated with the ubuntu-24.04 image.
  • If you use the ubuntu-22.04 version and run the pipeline, it should work.

For further updates or fixes, please track issues #10767 and #10636.

Feel free to reach out if you need any clarifications.

@aparnajyothi-y
Copy link
Contributor

Hello @dnkanga, please let us know if the information provided above resolved your issue? If you have any further concerns or questions, feel free to reach out.

@aparnajyothi-y
Copy link
Contributor

Hello @dnkanga, just gently following up to see if the information provided above has resolved your issue. If you have any further questions or concerns, please don’t hesitate to reach out.

@aparnajyothi-y
Copy link
Contributor

Hello @dnkanga, We are proceeding to close this issue after two reminders as we didn't hear anything from you for a long time.
Please feel free to reach us in case of any further concerns to reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants