Yesterday, I enjoyed participating in an online panel on Continuous Delivery and version control as part
of Continuous Discussions (#c9d9), a series of community panels about Agile, Continuous Delivery and
Devops. Version control helps provide fail-safe structure, quality and repeatability to developers. The team of panelists discussed the ins-and-outs of versioning: what should be versioned, how does version control affect the Continuous Delivery pipeline, where is version control heading, and more. Watch the
Continuous Discussions is a community initiative by Electric Cloud, which powers Continuous Delivery at
businesses like SpaceX, Cisco, GE and E*TRADE by automating their build, test and deployment
Below are a few soundbites from my contribution to the panel:
Who should be using it and what should be in Version Control?
“As we’re building and getting through deployments faster, binaries should definitely be in. I think they
should be in the same source control as the code. When binaries are separate it can take forever for
developers to download and access binaries."
“I think everyone involved in development of an application should be committing code, from the
database level to the images or the art or the ads should be in there. But everyone should agree as a
team on version control practices."
“We just did a hackathon and tossed everything into version control because we only had 18 hours to do
it - we relied on the source control to keep it all in place.”
How does versioning affect Continuous Delivery pipelines?
“Versioning and CD pipelines go hand in hand, you can’t do one without the other. But it’s important not to make things over-complicated. I’ve seen people try to take an existing process and use a set of tools to build a pipeline. That doesn’t solve the problem. I found myself spending half my time trying to get code in, and in the end it took longer than if I’d just disable everything, check into master and skip the pipeline. Sometimes people try to over-exercise the process – you need to take a bird’s eye view, to make sure you’re not effecting the different teams that need to deploy things to the cloud, to dedicated servers, and so on.”
How will version control evolve?
"Virtually everything will need to find a way into version control. Documentation is all over the place, I jump between Git, Subversion, Confluence, even our ticketing systems have a history and you need to go back and forth."
“It would be interesting to see, as software and approaches continue to evolve, that versioning tools and
concepts themselves inherit some best practices. Versioning should be role based, so if I’m a UI
developer I’ll check in my mockups. As the mockup evolves, you can go back to the exact same version
of the code that ties into those mockups: ‘Oh, that was the UI at that time, let’s go back to that’."
“For example, you deploy Android apps really quickly, as it gets faster you need understand what you did to go from here to there, written messages are not going to be enough to help me identify what that version looks like, I’ll need a visual representation.”
Have you had any version control horror stories?
“I actually had the same ‘oh shit’ story twice in my years. The first time we were learning Git and we didn’t provide proper training to the organization. ‘Pull frequently, merge code often’ – apparently teams on the West Coast weren’t following the same practices, and I remember getting a message that somebody force-committed and we lost two weeks’ worth of work. We had the latest version on local, but it took us three days to rebuild the entire repo.
“Five years later, at another organization, we had QA checking automated tests into the repos of the dev
code, one day someone force-fed in the code, and we lost 3 days of work. We immediately got alerts from the CI system. Having learned from the last time, this time we managed to recover everything in 2 hours, and the CI system helped us validate everything.
“People don’t have ill intentions but they’re not properly trained on the system, or we haven’t established best practices, and they’re just tossing stuff out. The lesson learned is that if they had a sandbox to play around in, they would learn how to check in and recover, and that wouldn’t be a horror story.”