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

enable bundler caching #148

Closed
wants to merge 1 commit into from
Closed

enable bundler caching #148

wants to merge 1 commit into from

Conversation

rkh
Copy link
Contributor

@rkh rkh commented Oct 1, 2013

Only merge when you are 100% sure you know what your are doing.

@joshk
Copy link
Contributor

joshk commented Jun 21, 2014

I would be in full favour to switch this on by default! (if the config is present of course)

@roidrage @rkh thoughts?

@rkh
Copy link
Contributor Author

rkh commented Jun 21, 2014

if the config is present of course

This would mean feature flagged repos on org and all repos on com, correct?

@joshk
Copy link
Contributor

joshk commented Jun 22, 2014

not at the moment, the s3 config is per worker not per repo. the plan was to move travis-build to an http api and have the s3 config there, but even then we would need to a way to feature flag and pass this in the hub payload.

I would love to see bundle caching be turned on by default for .com repos at the very least, and would love to see us feature flip this for .org repos.

@rkh
Copy link
Contributor Author

rkh commented Jul 2, 2014

Well, if we have the build API in place, we could simply have feature flags on the travis-build end (which could also be in the config file, since deploys will become very cheap).

@rkh
Copy link
Contributor Author

rkh commented Jul 2, 2014

I would love to see bundle caching be turned on by default for .com repos at the very least, and would love to see us feature flip this for .org repos.

Hm. It might be cool to use something like dat-sience or so to enable it for X% of the projects and see what happens.

@sferik
Copy link

sferik commented Mar 1, 2015

I’m withdrawing my objection to this pull request based on new behavior in recent versions of Bundler.

👍 for merging this change, assuming the Bundler 1.8 (or later) is part of the default build environment.

@joshk
Copy link
Contributor

joshk commented Mar 1, 2015

@sferik whats the new behaviour?

@sferik
Copy link

sferik commented Mar 1, 2015

@joshk bundle install behaves like bundle update when there is no Gemfile.lock.

I’m not sure exactly when that change was introduced to Bundler. I tried to find it in the history but it looks like the --local flag has existed since 2010, so it’s possible I was mistaken when I said bundle install has a bias toward local gems.

@joshk
Copy link
Contributor

joshk commented Mar 1, 2015

Hmmmm, thanks for the info, have you tested it out on a project on Travis to confirm?

@sferik
Copy link

sferik commented Mar 1, 2015

@joshk I’ve tested it locally. I can test it on a project on Travis CI now.

@joshk
Copy link
Contributor

joshk commented Mar 1, 2015

That would be super awesome!

Does this rely on Bundler 1.8? or will 1.7 ?

On Mon, Mar 2, 2015 at 10:53 AM, Erik Michaels-Ober
notifications@github.com wrote:

@joshk I’ve tested it locally. I can test it on a project on Travis CI now.

Reply to this email directly or view it on GitHub:
#148 (comment)

@sferik
Copy link

sferik commented Mar 2, 2015

👍 It works! (Build)

It seems to work with Bundler 1.7. That said, I’d be happy to see Bundler updated to version 1.8 in the build environment for other reasons.

@joshk
Copy link
Contributor

joshk commented Mar 2, 2015

Ok, but I see it using the cache fine, does it download the latest gem update if one exists though?

@sferik
Copy link

sferik commented Mar 2, 2015

@joshk I guess I’ll have to wait for a new dependent gem to be released. I’ll update this issue as soon as that happens.

@joshk
Copy link
Contributor

joshk commented Mar 2, 2015

Cool, thank you, otherwise we can add a bundle update after the install if there is no Gemfile.lock

On Mon, Mar 2, 2015 at 8:03 PM, Erik Michaels-Ober
notifications@github.com wrote:

@joshk I guess I’ll have to wait for a new dependent gem to be released. I’ll update this issue as soon as that happens.

Reply to this email directly or view it on GitHub:
#148 (comment)

sferik added a commit to sferik/twitter-ruby that referenced this pull request Mar 2, 2015
We can confirm it works as expected if this build installs version 0.7.2
of the http gem instead of using the cached version (0.7.1).
@sferik
Copy link

sferik commented Mar 2, 2015

@joshk Here we go! ^^

@sferik
Copy link

sferik commented Mar 2, 2015

Confirmed!

screen shot 2015-03-03 at 12 42 00 am

@joshk
Copy link
Contributor

joshk commented Mar 3, 2015

Welllllll, that is awesome! I'll talk to the team about this!

Thank you so much @sferik !!!!

@sferik
Copy link

sferik commented Mar 3, 2015

If you decide the release this, be sure to warn people that vendoring gems could cause issues with code coverage. SimpleCov will include all the vendored code as uncovered, potentially causing the tests to fail. I was able to solve this by adding the following line to spec/spec_helper.rb:

 SimpleCov.start do
   add_filter '/spec/'
+  add_filter '/vendor/'
   minimum_coverage(99.62)
 end

I believe this could be avoided by vendoring the gems into a hidden directory (e.g. .bundle) or a directory outside the build directory (e.g. /tmp). Just something to think about before you release the feature.

@ZurabWeb
Copy link

@rkh Needs rebase.

@mvdkleijn
Copy link

I was about to enable caching for my bundler / ruby dependencies based on http://docs.travis-ci.com/user/caching/ when I read this...

Is this going to be released soon-ish? If so, I'll wait for it to be automatically enabled.

@joshk
Copy link
Contributor

joshk commented Sep 23, 2015

No sorry, we don't have an ETA on this.

@BanzaiMan
Copy link
Contributor

Closing for now.

@BanzaiMan BanzaiMan closed this Jan 22, 2018
@BanzaiMan BanzaiMan deleted the rkh-global-bundler-caching branch January 22, 2018 20:11
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.

6 participants