Skip to content

Version 1.141.0 break my workflow #475

Closed

Description

@alejandraRamos

Ensure the following before filing this issue

  • I verified it reproduces with the latest version with - uses: ruby/setup-ruby@v1 (see Versioning policy)

  • I tried to reproduce the issue locally by following the workflow steps (including all commands done by ruby/setup-ruby, except for Downloading Ruby & Extracting Ruby),
    and it did not reproduce locally (if it does reproduce locally, it's not a ruby/setup-ruby issue)

Are you running on a GitHub-hosted runner or a self-hosted runner?

self-hosted runner

The workflow code or a link to the workflow file

- name: Set up Ruby
  uses: ruby/setup-ruby@v1
  with:
    ruby-version: 3.2.0

Link to the log of a failed workflow job, or to a gist with the output

Error: The current runner (ubuntu-22.04-x64, RUNNER_TOOL_CACHE=/opt/actions-runner/_work/_tool) was detected as self-hosted because the $RUNNER_TOOL_CACHE is different than the default tool cache path (they must be the same to reuse prebuilt Ruby binaries).

The command and output of the failing step

Run ruby/setup-ruby@v1
  with:
    ruby-version: 3.2.0
    bundler-cache: false
  env:
    ImageOS: ubuntu22
Error: The current runner (ubuntu-22.04-x64, RUNNER_TOOL_CACHE=/opt/actions-runner/_work/_tool) was detected as self-hosted because the $RUNNER_TOOL_CACHE is different than the default tool cache path (they must be the same to reuse prebuilt Ruby binaries).

Any other notes?

This change damaged the performance of my workflow. I run workflow on Self hosted runners
image

Activity

  1. meceonzo commented on Mar 3, 2023

    @meceonzo

    I am seeing this as well, and it is breaking a critical workflow. I do not have access to install ruby in the runner myself.

  2. bplexico commented on Mar 4, 2023

    @bplexico

    We're seeing the same issue. The only difference for us is the ubuntu version.

    (ubuntu-20.04-x64, RUNNER_TOOL_CACHE=/opt/actions-runner/_work/_tool)

    We're running Github Enterprise internally.

  3. jordanenglish commented on Mar 4, 2023

    @jordanenglish

    Same issue here.

    We used the following as a workaround to get critical workflows running again.

    uses: ruby/setup-ruby@v1.139.0
  4. eregon commented on Mar 5, 2023

    @eregon
    Member

    Thanks for the report.
    This conflicts with #242 though.

    Previously this only worked accidentally, in fact I guess your runner would download the prebuilt Ruby every single time, which was never intended (it should get cached in the tool cache for self-hosted). Because looking in the runner toolcache would not find anything since the runner toolcache doesn't have the same path as GitHub-hosted runner toolcaches.

    Is RUNNER_TOOL_CACHE=/opt/actions-runner/_work/_tool the default for self-hosted runners, or is it some path you chose?

  5. eregon commented on Mar 5, 2023

    @eregon
    Member

    I guess I'll need to revert 377a94b so these "self-hosted runners" which happen to match a github-hosted runner image but have their RUNNER_TOOL_CACHE set to something else still work somewhat as they did before.

  6. eregon commented on Mar 5, 2023

    @eregon
    Member

    Previously this only worked accidentally, in fact I guess your runner would download the prebuilt Ruby every single time, which was never intended (it should get cached in the tool cache for self-hosted).

    Actually it's worse than that, on every workflow execution it would also remove that Ruby and redownload and extract it. Which leads to problems such as #191 if two workflows using setup-ruby would ever run in parallel.

  7. eregon commented on Mar 5, 2023

    @eregon
    Member

    Should be fixed in https://github.com/ruby/setup-ruby/releases/tag/v1.142.0.
    TBH I never wanted to support self-hosted runners with this action, it's a ton of extra complications.
    This action might stop supporting them at some point entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions