News for hackers. Stuff that matters.
Re:Shipping is your company’s heartbeat (2013) by luckyt on Sunday September 24, 2017 @09:54AM (#15324701)
> In a company where you ship continuously, you see this and think “Simple – I’ll tweak a test and a regex pattern, get a quick code review from my buddy beside me, merge to mainline, and 1 minute later when it’s deployed to production, reply to the customer: ‘Sorry about this, it’s fixed now, thanks for letting us know.’”

This sounds like a really bad idea. If it's not a critical bug impacting all your customers, do you have to fix it in 1 minute? Once your company gets bigger, you would want to do proper code review and QA, so your 'one-line fix' doesn't accidentally bring down the whole site.

Re:Shipping is your company’s heartbeat (2013) by toast0 on Sunday September 24, 2017 @11:50AM (#15325137)
If it only takes 1 minute to push a fix, it usually will take about the same amount of time to revert it, if it's broken. Then you can do the fix again, but with more care and testing. If all goes well, you only have to think about this issue for 10 minutes, and then get on with your life, you don't have to spend 10 minutes a day following it through the 2 week deployment process and only then notify the customer that they can finally use the product.

Also, if you think a fix needs more care, the ability to ship quickly doesn't impede doing it slowly; but in many companies there is simply no ability to ship fast, regardless of the type of bug.

Re:Shipping is your company’s heartbeat (2013) by emmab on Sunday September 24, 2017 @03:58PM (#15326233)
> If it only takes 1 minute to push a fix, it usually will take about the same amount of time to revert it, if it's broken.

Unless it caused data corruption.

Re:Shipping is your company’s heartbeat (2013) by toast0 on Sunday September 24, 2017 @05:58PM (#15326702)
Yes, that's why I said usually. It's also why I said, you can take it slow if you're concerned. And something that would possibly cause data corruption is a good thing to take more time with.
Re:Shipping is your company’s heartbeat (2013) by blumomo on Sunday September 24, 2017 @10:32AM (#15324833)
In a perfect scenario you would have set up continuous integration that automatically runs all your unit, integration and end-to-end tests. Ideally your coverage with tests is so good that you can rely on a successful integration of the bug fix commit.

This of course is a ideal scenario that you have to work on seriously to be very close to it.

Re:Shipping is your company’s heartbeat (2013) by wpietri on Sunday September 24, 2017 @04:08PM (#15326280)
Continuous deployment works differently. Your approach focuses on reducing MTBF; continuous deployment focused on reducing MTTR.

For CD to work, you can't really depend on QA for regression testing. You need to have really good automated test suites. You still do want exploratory QA, but that doesn't have to happen before release.

Code review works similarly. As your quote says, he did proper code review. It was a very small change, so it doesn't take long. Strong test coverage means code review is less about finding possible bugs and more about design issues. There's no urgency to getting those before release; people can watch changelogs just as well as they can service a review queue. And with frequent releases, developers return to important code often, meaning that design improvements happen over time.

Re:Shipping is your company’s heartbeat (2013) by BillinghamJ on Sunday September 24, 2017 @12:30PM (#15325355)
You deploy gradually, initially to 1% or so of requests. If your metrics, KPIs, etc. don’t suffer, it continues to roll-out until 100% of requests are using that code-path - within a few hours or so.

Takes a bit of infra effort, but for a company like Intercom, that’s very easily achievable.

Re:Shipping is your company’s heartbeat (2013) by AznHisoka on Sunday September 24, 2017 @02:16PM (#15325795)
this is easy and doable if your change is a front end change.

good luck trying this when its a backend change involving distributed threads, locks, resources, etc where production load is 100x more than staging/test.

Re:Shipping is your company’s heartbeat (2013) by greenleafjacob on Sunday September 24, 2017 @02:49PM (#15325923)
If the cost of downtime is high enough you can mirror some or all traffic onto a shadow copy of the infrastructure.
Re:Shipping is your company’s heartbeat (2013) by BillinghamJ on Sunday September 24, 2017 @03:04PM (#15325984)
Obviously in those cases, you’d take more than a minute to review prior to deployment...

There are plenty of backend changes where your list of complexities do not apply.

Re:Shipping is your company’s heartbeat (2013) by ben_jones on Sunday September 24, 2017 @12:49PM (#15325442)
what would be some good resources to learn how to build such infrastructure? I've seen it as a feature of various platforms but would imagine it could become complex otherwise.
Re:Shipping is your company’s heartbeat (2013) by BillinghamJ on Sunday September 24, 2017 @02:06PM (#15325769)
It wouldn’t be practical without some kind of underlying infrastructure orchestration system. Obviously some companies have gone the extra step to actually build these systems - e.g. Google made Kubernetes. For any not-huge companies, I think it pretty much just falls to choosing one of the many existing tools.

Obviously it is possible to just throw together a bunch of scripts and vaguely make it all happen, I’m not sure I’d be comfortable to do that in production.

Re:Shipping is your company’s heartbeat (2013) by toast0 on Sunday September 24, 2017 @06:02PM (#15326720)
The simple way to do this can apply if you're mostly doing things in the context of a user. Write the change to check if a hash of the user identifier is less than a target; increase the target over time.
Re:Shipping is your company’s heartbeat (2013) by zeckalpha on Sunday September 24, 2017 @10:09AM (#15324753)
Yes, because otherwise non-critical bugs pile up and hide critical bugs.
Re:Shipping is your company’s heartbeat (2013) by pyrophane on Sunday September 24, 2017 @10:45AM (#15324899)
Another solution to this is regular bug triage.
Re:Shipping is your company’s heartbeat (2013) by zeckalpha on Sunday September 24, 2017 @11:16AM (#15325000)
Stale inventory is expensive.