-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
When executing RubySetup twice in the same job, the Bundler version is superseded by an env var set in the first RubySetup step.. #444
Comments
I see, thank you for the detailed report. Using ruby/setup-ruby twice in the same job is not really tested or supported currently, although I think it makes sense to support it as an easy way to use multiple Bundler caches. Yet, it's not as clean as using separate CI for that. Workarounds:
To fix this:
|
* This reverts commit 3190662. * It causes other issues such as #444 due to creating additional global state. * The use-case it solves is too niche to risk such issues, using `bundler-cache: true` avoids the problem. * See #444 (comment)
Solved by reverting 3190662 |
Thank you! In terms of why this is done as one job vs two, I'm not sure offhand as I'm on the platform team, rather than the app team that manages this application. I would assume its because of dependencies between components in the first_folder and the second_folder. This is a mono repo, so the services are in different folders. |
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 forDownloading 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?
GitHub-hosted runner
The workflow code or a link to the workflow file
Link to the log of a failed workflow job, or to a gist with the output
Not sure how to provide this (and I dont believe I can) since it is from a private repo.
The command and output of the failing step
Any other notes?
With this most recent commit to add BUNDLER_VERSION after installing Bundler, it has impacted the behavior of one of our jobs where two different versions of bundler are used in two different sub-folders (two steps within in the same job).
The first one uses 1.17.3 and this commit then causes the action to write out an env var with this version that is then used by the second Setup Ruby action. I tried setting the bundler version as a Ruby input on the second action, but it seems that the env var overwrites it.
The text was updated successfully, but these errors were encountered: