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

Config bundler locally for path, without and gemfile options #97

Conversation

spajic
Copy link

@spajic spajic commented Aug 20, 2017

The problem

bundle check always failed for me, cause it worked with different options than bundle install

  • it worked with different path
  • and different without

After some investigation I succeed to pass relevant options to bundle check, so it passed successfully.
But after that bundle exec failed. Because it relied on options that was set during bundle install!

The solution

I suggest to config relevant options beforehand, so bundle check, bundle install, bundle exec all work in the same context.

@capistrano-bot
Copy link

1 Warning
⚠️ Please update CHANGELOG.md with a description of your changes. If this PR is not a user-facing change (e.g. just refactoring), you can disregard this.

Thanks for the PR! This project lacks automated tests, which makes reviewing and approving PRs somewhat difficult. Please make sure that your contribution has not broken backwards compatibility or introduced any risky changes.

Here's an example of a CHANGELOG.md entry (place it immediately under the * Your contribution here! line):

* [#97](https://github.com/capistrano/bundler/pull/97): Config bundler locally for path, without and gemfile options - [@spajic](https://github.com/spajic)

Generated by 🚫 Danger

@spajic
Copy link
Author

spajic commented Aug 20, 2017

I think this may solve issues #95 and #96

@mattbrictson
Copy link
Member

Thanks for the PR! This does solve the problem, but it also involves three extra bundle config commands be executed on every deploy. Doesn't this add a lot of time to the deploy? Or is it still an overall speed improvement in your experience?

@spajic
Copy link
Author

spajic commented Nov 1, 2017

Hello, @mattbrictson !
It is still almost 100x win in our experience.

bundle command takes about 25 seconds to fetch metadata

Fetching gem metadata from https://rails-assets.org/...
Fetching version metadata from https://rails-assets.org/..
Fetching gem metadata from https://rails-assets.org/...
Fetching gem metadata from https://rubygems.org/.......
Fetching version metadata from https://rails-assets.org/..
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rails-assets.org/..
Fetching dependency metadata from https://rubygems.org/.

We have about 50ms ping to our production servers in GCE.
One bundle config command takes about 100ms
3 more commands add about ~300ms

So our win is 0.3 s vs 25 s

By the way, we already use it in production.
I have made some improvements to this PR.

I will make one more PR with this improvements. UPD: #101

@mattbrictson
Copy link
Member

Closing in favor of #122

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

Successfully merging this pull request may close these issues.

3 participants