Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How far do you take version control? [closed]

The theory that "disk" is cheap has gotten a bit out of hand lately. There are some powerful aspects of version control that have enabled us to onboard new developers with a few bootstrap files and one simple command to pull the toolchain over.

Recently upgrades to the systems have prompted requests for storing built binaries. This has been followed on by a request to version the entire virtualized build system. Each layer added on top creates important relationships between repositories and a good fundamental design is necessary to manage it.

The storing of the toolchain brought instant benefit while the storing of the built binaries brough instant liabilities. Git, unfortunately, has some fundamental issues when dealing with large binary files.

Where do you draw the lines at using VC in the right ways and when do you start investigating more appropriate solutions?

like image 841
ojblass Avatar asked Apr 11 '09 02:04

ojblass


People also ask

When should you use version control?

What Is Version Control and Why Is it Important? Version control is important to keep track of changes — and keep every team member working on the right version. You should use version control software for all code, files, and assets that multiple team members will collaborate on.

Why do we do version control?

Version control helps teams solve these kinds of problems, tracking every individual change by each contributor and helping prevent concurrent work from conflicting. Changes made in one part of the software can be incompatible with those made by another developer working at the same time.

Why should I use version control stackoverflow?

Use version control for everything you do. Any version control, SVN, Git, even CVS, master it and use it." I have never used any sort of version control and I do not find it that great. I have googled it and looked at it before, but I just need it put into children's terms if you will please.


3 Answers

You probably shouldn't be storing the "entire virtualized build system" as a giant binary. If you want to version your application, you version the source code, not the compiled binary.

What many shops do is store in version control the steps to recreate the build server. Then you need one fixed image (a stock, out-of-the-box OS install), plus a small number of files (what to install on it, and how). Some places even have their server rebuild the app from source, on a clean OS install, for every deploy/reboot.

Versioning the OS image itself as a giant binary isn't nearly as useful. You can't branch. You can't merge. You can't diff. What's the point? You might save space if your VCS can do binary diffs, but that probably takes a ton of CPU and memory to do, and if they're on a "disk is cheap" binge, then there's no reason to make life painful just to save disk space.

Either store your install scripts/libraries in VC and rebuild the VM image as needed, or just store VM images in normal files. I don't see any point in putting the images in VCS.

like image 65
Ken Avatar answered Sep 20 '22 13:09

Ken


I'd say there's an order of operations here:

If they need to store files, use a file system.

If they need to track changes, use version control.

If they need to track relationships to data, use a database.

The more complicated the requirements, the more complicated the solution. But discipline is in order for those who want the more complicated solution; in these uncertain times one must avoid wasting time.

like image 24
Michael Hedgpeth Avatar answered Sep 20 '22 13:09

Michael Hedgpeth


What I always put in version control:

  • source code and makefiles: the minimum needed for building binaries.
  • tests suites

What I never put in version control:

  • built binaries: they can be recreated from source control, and if I know that I may need a specific release immediately, I store them in file system in a way similar to Linux kernel.

What I put in version control depending on project:

  • build chain: I don't put it in version control when I trust the provider or when I can recreate the environment (Apple's Xcode, open-source tools such as gcc or doxygen, ...). I put it in version control when it is specifically dedicated for the project (e.g., home made cross compilation chain) and when I need to recreate a binary exactly as it was built for delivery (for finding heisenbugs when any component may be involved, from the code to the OS or compiler).
like image 31
mouviciel Avatar answered Sep 24 '22 13:09

mouviciel