News for hackers. Stuff that matters.
Re:Rewriting RubyGems.org Git History by akerl_ on Wednesday February 04, 2015 @01:02PM (#8998399)
Obviously I'm not in their place, but in hindsight, my first thought when reading their initial issue was "Why not make a container that serves the minimal subset of Rubygems stuff necessary to bootstrap Rubygems, and use that as a source in the event that the main side died and needed to be kickstarted again.

Docker itself used a similar strategy for their build process: the recommended build process uses containers to build the Docker binary, so they made a precompiled binary available that was crafted "the hard way" that could then be used for running the saner build process.

Re:Rewriting RubyGems.org Git History by Xylakant on Wednesday February 04, 2015 @01:24PM (#8998574)
The point that they want to track the versions of gems rubygems.org depends on in a VCS and track the dependency for each version of rubygems.org. You can build a container that includes those, but then you'd have to keep the container in a VCS - that's obviously possible but tangential to the problem.
Re:Rewriting RubyGems.org Git History by jbergknoff on Wednesday February 04, 2015 @12:26PM (#8998141)
It would be really helpful to go into some detail on the steps taken to clean up the git history.
Re:Rewriting RubyGems.org Git History by jerf on Wednesday February 04, 2015 @02:09PM (#8998930)
It isn't what they did, but my recommendation for most such use cases is the BFG Repo-Cleaner: https://rtyley.github.io/bfg-repo-cleaner/

Don't be deceived by the "java" invocations, it's written in Scala, so it's HN-approved!

Re:Rewriting RubyGems.org Git History by albertzeyer on Wednesday February 04, 2015 @01:51PM (#8998787)
Removing directories is simple.

http://git-scm.com/docs/git-filter-branch

But you can do almost anything via custom scripts.

Re:Rewriting RubyGems.org Git History by anton_gogolev on Wednesday February 04, 2015 @03:08PM (#8999365)
The-other-good-DVCS-that-everyone-almost-forgot-about, Mercurial, has exactly two solutions to the problem of overly large repos which, I presume, contain a lot of BLOBs.

First is Streaming Clones[1], whereby Mercurial server just takes all the files from the repository and transmits them over the transport connection, significantly decreasing TTFB.

The second is Largefiles extension[2], which turns Mercurial into more of a CVCS, but allows for efficient storage and retrieval of large binary files.

[1]: https://hglabhq.com/blog/2014/6/20/working-with-mercurial-ov... [2]: http://mercurial.selenic.com/wiki/LargefilesExtension

Re:Rewriting RubyGems.org Git History by apetresc on Wednesday February 04, 2015 @12:41PM (#8998240)
I find it funny that the problem was they didn't think enough people know about the `--depth 1` flag to git clone, so the solution is to use submodules (which far fewer people know how to use properly).
Re:Rewriting RubyGems.org Git History by Xylakant on Wednesday February 04, 2015 @12:47PM (#8998289)
You can check for a missing submodule (folder) in your setup script and print helpful advice, but you can't do the same for the large repo: the damage is already done by the time you get to print instructions. In this case things are even easier: the submodule is just a backup for the thing that bundler will do anyways when running "bundle install".
Re:Rewriting RubyGems.org Git History by Pym on Thursday February 05, 2015 @02:12AM (#9002114)
Also, don't forget that "everyone must rebase"...