-
Notifications
You must be signed in to change notification settings - Fork 3k
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
bundle install
with cached Ruby version fails
#10215
Comments
Hi @rafalhejna , We will analyse the issue and provide the solution, thanks |
Hi @rafalhejna , Could you please retry the same and share the snippet/workflow file is any errors. thanks |
@vidyasagarnimmagaddi The issue is still present. I haven't done enough research into it, so my recreation steps are not quite correct. Below please find sample workflow and Gemfile files, that will cause the same issue. workflow.yml
Gemfile
|
Hi @rafalhejna , the above provided workflow , successful at our end,.
|
@vidyasagarnimmagaddi Still the same error. Here's my workflow file
And here is the output log
|
Hi @rafalhejna , the issue is due to the permissions.Kindly try this.
|
@vidyasagarnimmagaddi So your suggestion worked, but this solution looks rather "hacky". Is it really the only way to make this work? Can this setting be applied more "globally" to all runners? |
This is a real challenge to do if you happen to be using a matrix build with many different versions of ruby. |
This is exactly what we are encountering. We were able to just be quite a bit more liberal in our
That seemed to do the trick for us. |
This seems a bug of the prebuilt Ruby 3.2.4 in the toolcache, where it got wrong permissions. Since ruby/setup-ruby#98 the expectation is the binaries from https://github.com/ruby/ruby-builder are used. |
https://github.com/eregon/actions-shell/actions/runs/10199673790/job/28217339098 shows that indeed the permissions are wrong:
That should be fixed in the scripts creating the runner images (i.e., this repo). https://github.com/ruby/ruby-builder/releases/download/toolcache/ruby-3.2.4-ubuntu-22.04.tar.gz has the correct permissions, see ruby/setup-ruby#624 (comment) |
OTOH it seems the permissions are wrong for everything under
I don't know if that is new or it was always like that. |
Remove write access to the world on GEM_HOME. Hopefully a temporary workaround until the runner image is fixed. See actions/runner-images#10215
Remove write access to the world on GEM_HOME. Hopefully a temporary workaround until the runner image is fixed. See actions/runner-images#10215
Alternative workaround to /opt/hostedtoolcache/Ruby being world writable in the ubuntu 20240708.1.0 GA runner image. See actions/runner-images#10215
* `require_application_and_environment` was removed ah, the joys and thrills of depending on a private API * make sure IO is flushed while testing console interactions * fix issue with responses being duplicated due to prompts being recognized more than once * try testing against Rails 7.0 and 7.1, and Mongoid 8.0, 8.1, and 9.0 * fix rubocop complaints * compensate for configure syntax in Mongoid 8.0 * start simplifying * putting things in their proper places * remove setuppable concern and use the new helpers instead * rubocop appeasement * workaround GHA runner issue actions/runner-images#10215 * test versus Rails 7.2 also * don't test Rails 7.2 with Ruby 3.0 because Rails 7.2 is 3.1+ * ugh, nevermind. Mongoid doesn't support Rails 7.2 yet * remove unused module, and merge artifact
GitHub's current Ubuntu 22.04 runner image has wrong permission set for `/opt/hostedtoolcache` and causes `bundle install` to error out - actions/runner-images#10215
Description
Running
bundle install
is fine when we're using the non-cached version of Ruby on the previous Ubuntu runner image versionBut, when using the same Ruby version on the latest ubuntu-22.04 image (which is cached now), the same process fails:
Platforms affected
Runner images affected
Image version and build link
20240708.1.0
Is it regression?
Yes, it worked on 20240630.1.0
Expected behavior
bundle install
is successfulActual behavior
bundle install
failsRepro steps
ubuntu-latest
as a runner imagesetup-ruby@v1
step with version 3.2 of Rubybundle install
stepThe text was updated successfully, but these errors were encountered: