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

bundle install --local in test tries to contact remote #185

Open
marcotc opened this issue Jul 6, 2021 · 4 comments
Open

bundle install --local in test tries to contact remote #185

marcotc opened this issue Jul 6, 2021 · 4 comments

Comments

@marcotc
Copy link
Contributor

marcotc commented Jul 6, 2021

While implementing #184, I noticed that appraisal tests (invoking rake in this repository) were failing.

At first they were failing with the issue addressed by #184, but after fixing that there's still one more test failing:

[DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs --all`
Could not reach host other-rubygems.org. Check your network connection and try
again.

RuntimeError:           Command "bundle install --local" exited with status 17. Output:
            Fetching ../gems/croissant
Fetching ../gems/egg
Fetching ../gems/omelette

  1) Appraisals file Bundler DSL compatibility supports all Bundler DSL in Appraisals file
     Failure/Error:
       raise RuntimeError, <<-error_message.strip_heredoc
         Command #{command.inspect} exited with status #{exitstatus}. Output:
         #{output.gsub(/^/, '  ')}
       error_message

     RuntimeError:
                 Command "bundle install --local" exited with status 17. Output:
                   Fetching ../gems/croissant
       Fetching ../gems/egg
       Fetching ../gems/omelette
     # ./spec/support/acceptance_test_helpers.rb:162:in `block (2 levels) in run'
     # ./spec/support/acceptance_test_helpers.rb:154:in `tap'
     # ./spec/support/acceptance_test_helpers.rb:154:in `block in run'
     # ./spec/support/acceptance_test_helpers.rb:149:in `chdir'
     # ./spec/support/acceptance_test_helpers.rb:149:in `in_test_directory'
     # ./spec/support/acceptance_test_helpers.rb:153:in `run'
     # ./spec/acceptance/appraisals_file_bundler_dsl_compatibility_spec.rb:84:in `block (2 levels) in <top (required)>'

This errors happens only with newer versions of bundler.

After bisecting the bundler changes, I found that rubygems/rubygems@d8b59a1 introduces the behaviour makes this test fail (which was released with bundler 2.2.14).

It seems like bundle install --local wants to contact other-rubygems.org, which doesn't seem right.
When using a version of bundler from before rubygems/rubygems@d8b59a1, it does not try to contact the remote.

I wasn't able to decipher what part of rubygems/rubygems@d8b59a1 is the culprit, or if the issue is in appraisal or in bundler itself. I'm opening the issue here as this is manifested in one of the tests in the repository.

@nickcharlton
Copy link
Member

In your local setup, have you switched git to use main in the init.defaultBranch configuration?

If I restore this value to master, the tests pass but with main two are failing. Could you try the same and see if you get the same outcome?

@nickcharlton
Copy link
Member

Oh! I think I understand the problem properly now.

I was previously running 2.2.4, and seeing failures around this test, too, which confused me. I upgraded bundler to 2.2.24 which resolved the Git problem I mentioned previously (there's a small change we can make here to avoid a lot of hint: ... warnings).

In the test, we're just running bundle install --local by shelling out to it, so I think this is a problem upstream. I'll open an issue there as I can't see anything wrong with our setup here.

@deivid-rodriguez
Copy link
Contributor

This is now fixed upstream I think!

@nickcharlton
Copy link
Member

Wonderful! Thank you, @deivid-rodriguez.

@marcotc, could you try this again at some point and see if your problem is resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants