atmos / heaven

:walking: Rails app for GitHub Flow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update provider libraries to download tarball vs cloning a git repository

maletor opened this issue · comments

Downloading the archive vs cloning the repository is a detail of the provider I think it would be nice to configure or change altogether.

In fact, using the archive link may be the better route for all deploys. The reason being is you can download a 3GB git repo as a 25MB tarball a lot faster.

One area where this is advantageous to clone is frequently deploying and reusing the same checkout. Perhaps we should try the --depth command ` (link)

But the same tarball and even the same extracted tarball can be reused just the same.

For example: /working_directory/atmos-heaven-a8552fa

Yup, they will be but small changes between deployments will end up being more costly by checking out new revisions rather than a fetch and hard reset to the specific sha.

Wanna whip up a PR and we can look at it more closely?

Right, that's certainly a disadvantage. But, probably not a big one. Let's examine the scenarios.

If you have a small repository anyways then the download time is negligible, about as negligible as a git connection and fetch.

If you have a large repository, then it should be obvious an archive link would be advantageous.

It might look something like this provider.

The bundler capistrano provider will also have the drawback of rebundling on each new tarball download, often really time/resource expensive, which will slow down your deployments.

Again, I don't think there are any extra cpu cycles offered by the tarball approach.

On heroku everyting in /tmp is gone after reboot or dyno cycling which happens once or twice a day. So, the system should be designed to work fast in the worse case scenario more often than otherwise.

Once git fetch or curl has been run, we're looking at exactly the same time for cached git repositories or tarball downloads. After gems are installed, bundle install runs bundle check and exits very quickly under both scenarios.

Can you make a PR for this?

Yes. On an extended vacation so give me some time.
On Wed, Jun 24, 2015 at 12:42 AM Corey Donohoe notifications@github.com
wrote:

Can you make a PR for this?


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