Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Avoid reinstalling dependencies with bundler on every build #939
Conversation
|
@saivann huh. I think that's a regression, as I don't remember it doing that when I first set it up. (But I just tested, and you are correct) However, I haven't been able to find a plausible commit where anything changed. I think dropping LGTM. Suggest merging whenever you're ready to manually update the live build script. Thanks for catching this! |
|
@harding Ah... for a moment I forgot that the repository is copied to a temporary directory before "bundle install" is ever called, so my previous solution just wouldn't work. I've just implemented your second suggestion which I think should work fine this time. Thanks! Re Regression: At least that's now the intended behavior according to their current documentation
|
|
Note; I haven't implemented this solution on the build server yet. If there is no opposition, I will apply these changes to the VM later today. |
saivann
changed the title from
Avoid deleting excluded files in .gitignore in build script
to
Avoid reinstalling dependencies with bundler on every build
Jul 4, 2015
saivann
added
the
Merge Scheduled
label
Jul 4, 2015
|
4e40909 untested LGTM. Thanks! |
saivann
merged commit 4e40909
into
bitcoin-dot-org:master
Jul 4, 2015
1 check passed
saivann
deleted the
saivann:buildvendor branch
Jul 4, 2015
|
Thanks! I just finished testing and the script is working as intended. |
|
I don't know if this is related, but the about-us and development pages aren't displaying the contributor listings from github. I'm looking into it now. |
|
@harding Ah, I restarted the builds quite many times and the GitHub API has a limit on the number of calls you can make per minute (Edit: or hour). I would really not be surprised if that's the only reason. This API call use to fail once in a while, but works fine the vast majority of the time. Edit: This is usually an issue that auto-resolves after an hour. |
|
@saivann yeah, that was my first guess too (I used to have the issue for local builds all the time until you added selective plugin disablement), and it seems to have been the correct guess: I triggered a rebuild of the site on the server with no other changes, and it looks fine now. thanks! |
|
@harding Thanks a lot for watching at those issues so carefully! |
saivann commentedJul 4, 2015
This change brings significant performance improvement for the build process, as the build script otherwise deletes ./vendor, which forces bundler to reinstall every dependency from scratch on every build, which then delays the build for approximately 3 minutes.
It also seems to me that downloading and installing dependencies on every build exposes us to some more third party risk for no reason.
Git clean man file for the -x option:
https://git-scm.com/docs/git-clean