-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
CI fails with with different bundler execution #961
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…r some reason even though the path is set correctly bundler incorrectly uses the wrong path to load the wrong version of Ruby (the buildpack Ruby version instead of the Ruby version the customer's app wants/needs). This is what the failure mode looks like: ``` # test setup -----> Fetching heroku/ruby buildpack... buildpack downloaded -----> Ruby app detected -----> Installing bundler 2.0.2 -----> Removing BUNDLED WITH version in the Gemfile.lock -----> Setting up Test for Ruby/Rack -----> Using Ruby version: ruby-2.7.0 -----> Installing dependencies using bundler 2.0.2 ``` ``` # test actual -----> Running Ruby buildpack tests... -----> Installing bundler 1.17.3 -----> Removing BUNDLED WITH version in the Gemfile.lock -----> Running test: bundle exec rspec bundler: failed to load command: rspec (/app/vendor/bundle/bin/rspec) Bundler::RubyVersionMismatch: Your Ruby version is 2.6.5, but your Gemfile specified 2.7.0 ``` From inside of a `bin/support/test_ruby` modified run: ``` $ which bundle 25c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/vendor/ruby/heroku-16/bin//bundle $ bundle -v Bundler version 2.0.2 ``` It appears that the `test/support/test_ruby` script is invoking bundler and in these cases the system `bundle` is being invoked instead of the customer's bundler version. This then causes the wrong version of Ruby to be loaded, presumably due to some coupling in the default Bundler ruby gem. Internal tickets: - https://heroku.support/834258 - https://heroku.support/834446
schneems
force-pushed
the
schneems/ci-fails-with-ruby-265
branch
from
March 11, 2020 18:49
b71a8f5
to
4c7f0f7
Compare
Tests fail as expected:
|
Ruby 2.6+ ships with a version of bundler. If we do not ensure that the customer's `bundle` binary is on the path before the Ruby buildpack's then the buildpacks version may be used. This PR prevents this problem by ensuring that the vendored customer version of bundler is always first in the path before any existing binaries and after the customers `bin/` dir. # Do not modify or remove the line above. # Everything below it will be ignored. # # Date: Wed Mar 11 14:07:17 2020 -0500 # # interactive rebase in progress; onto f20f977 # Last commands done (3 commands done): # pick 0b5e9f8 Force user's bundler on the path # squash d51fa3b Blerg # No commands remaining. # You are currently rebasing branch 'schneems/ci-fails-with-ruby-265' on 'f20f977'. # # Changes to be committed: # modified: bin/support/ruby_test #
schneems
force-pushed
the
schneems/ci-fails-with-ruby-265
branch
from
March 12, 2020 15:06
d51fa3b
to
3d04201
Compare
Malax
approved these changes
Mar 12, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm not 100% sure why this failure mode happens, but it looks like for some reason even though the path is set correctly bundler incorrectly uses the wrong path to load the wrong version of Ruby (the buildpack Ruby version instead of the Ruby version the customer's app wants/needs).
This is what the failure mode looks like:
From inside of a
bin/support/test_ruby
modified run:It appears that the
test/support/test_ruby
script is invoking bundler and in these cases the systembundle
is being invoked instead of the customer's bundler version. This then causes the wrong version of Ruby to be loaded, presumably due to some coupling in the default Bundler ruby gem.Internal tickets: