Swift Deploys: Dealing with Anti-Patterns and Unresolved Issues

In a long end-of-the-year blog post, Charity Majors, co-founder and CTO of honeycomb.io, discussed lead time to deploy, or “the interval encompassing the time from when the code gets written and when it’s been deployed to production.”

Reiterating points from a Twitter thread, Majors (aka @mipsytipsy), noted that swift deploys:

  • Let you ship a single changeset by a single dev at a time.
  • Make it easy to isolate the owner of any problem.
  • Prevent the blast radius from expanding.
  • Make it easy to fix while the intended effects of the code are fresh in their mind.

And, when Majors says “swift,” she means “lead time should clock in under 15 minutes, all the way from merging to deployed.” 

“It’s nigh impossible to have a high-performing team with a long lead time,” she says, emphasizing:

🌷 Shorter is always better.
🌻 One mergeset per deploy.
🌹 Deploy should be automatic.

“If you get CI/CD right, a lot of other critical functions, behaviors, and intuitions are aligned to be comfortably successful and correct with minimal effort. If you get it wrong, you will spend countless cycles chasing pathologies,” she says.

Likely Suspects and CI/CD Offenders

Majors pulls points from her Twitter thread to provide a comprehensive list of “Likely Suspects and CI/CD Offenders, a long list of anti-patterns, and some unresolved personal pain & suffering to hunt down and question when your build gets slow.” Her general advice starts with:

  • Instrument your build pipeline with spans and traces so you can see where all your time is going. ALWAYS. Instrument.
  • Order tests by time to execute and likelihood of failure.
  • Don’t run all tests, only tests affected by your change.
  • Similarly, reduce build scope; if you only change front-end code, only build/test/deploy the front end, and for heaven’s sake don’t fuss with all the static asset generation.

“There are no magic tricks here,” Majors says, “just high standards and good engineering, and the commitment to maintaining your goals quarter by quarter.”

Read the complete article at Charity.wtf.

Comments