News for hackers. Stuff that matters.
Re:On Monolithic Repositories by TheAceOfHearts on Tuesday August 04, 2015 @11:28PM (#10007895)
How do people do CI with monolithic repositories? Do they run ALL the tests or is there an easy way around that?
Re:On Monolithic Repositories by QuercusMax on Tuesday August 04, 2015 @11:53PM (#10007953)
At Google, the dependencies for everything are very well specified, so in most cases the code affected by a single change is quite small. Dependencies are often specified on a per file basis. It's kind of a pain in the ass, but being able to know for sure you won't break stuff is very powerful.

Also, they have a ridiculous number of machines dedicated to running automated tests. My tech lead told me "feel free to add as many tests as long as they're under 30 seconds each".

I was super skeptical of perforce before starting at Google, but it works really well, especially in conjunction with the code review tools and processes

Re:On Monolithic Repositories by cpeterso on Wednesday August 05, 2015 @01:44AM (#10008195)
> Dependencies are often specified on a per file basis. It's kind of a pain in the ass, but being able to know for sure you won't break stuff is very powerful.

How are the dependencies specified? Is this a language-specific tool?

Re:On Monolithic Repositories by gefh on Wednesday August 05, 2015 @01:54AM (#10008211)
Bazel is the open source version of the internal build tool, it is multi-language. BUILD files in each directory specify dependencies and more.
Re:On Monolithic Repositories by skybrian on Wednesday August 05, 2015 @12:05AM (#10007974)
That's the job of the build system. After syncing to a new version, it should only rebuild and re-run the tests where a dependency changed. (It helps to have fine-grained dependencies to avoid running compiles or tests unnecessarily.)

However, that's not enough when you touch a fundamental library and nearly everything is a downstream dependency. Then you really do need to run all the tests, so the build system should be able to run them in parallel on a build farm. Also, test results need to be cached by the build farm so every user doesn't need to run the same tests again for the same change.

See Bazel [1] for how Google does it. (Well, it doesn't provide the build farm, but you can see what the build files look like.)

[1] http://bazel.io/

Re:On Monolithic Repositories by brandonbloom on Tuesday August 04, 2015 @11:49PM (#10007947)
With SVN (or similary) you'd simply configure your CI to 1) checkout 1 or more files and subdirectories and 2) config your CI to run a particular build script.

The notion of zero-config CI is a recent invention, thanks to conventions of small repos with well-known project file names per language/platform ecosystem.

Re:On Monolithic Repositories by justinmk on Tuesday August 04, 2015 @11:43PM (#10007937)
Your build agents should use a cached .git, and only pull updates. Different test groups can be a different build target in your build/make file, or you can have nested build files.