by mabbo · 8y ago · 0 comments
Our velocity increased, time-to-market dropped, operational workload fell. It was great.
Sadly, after a few years of the joy of full-CD, more conservative leadership took over our org. Now, all deployments of software must be accompanied by paperwork (digital), step-by-step plans of how you're going to deploy this software, approvals from senior managers, just general micromanagement. CD isn't possible in such environments.
The middle ground I've found is to have fully automatic deploys in lower environments and automate the entire process for production. But rather than have releases flow there automatically, production is handled by pressing a single "Deploy whatever is in UAT to prod" button (i.e. the "Big Red Easy Button"). You then give access to that button to somebody else in the org (ex: a UAT team, a release team, your manager) and everybody's happy. It also conveniently gives you an excuse to never fill out production release paperwork as "It's not my job, I'm not allowed to release to production!"
People everywhere like feelings of control. And the more layers of management a company has, the more executive feelings come to predominate over on-the-ground business facts. But in practice, bureaucratic change-control processes don't actually produce better code or safer systems. In my experience, they make things worse, because large batches and slow feedback loops make bugs easy to add and hard to find.
One good next step after the middle ground you describe is continuous deployment of code, but using feature flags and A/B testing tools to control visibility and impact of features. As you say, if you give people some big, obvious controls, they feel in control. Decoupling code release with business impact lets me get on with what I care about. And it lets them learn to be bolder, more engaged in the process of delivering value to users.
Automating a deploy is relatively straightforward but doesn’t provide much value if that’s all you do. Local reproduction of build steps, metrics, historical data, building out test infrastructure, all of this is important for scaling up a team and keeping regressions low.
To do this the process needs to be self service. You can find mid level people pretty easily. Anyone who wants a promotion or become an SME should have tools to do a lot of that work themselves instead of having to extract it from the leads or follow the School of Hard Knocks.
Good automation supports this, bad automation makes this harder.
Of course if your management is actively against CD that could be hard but generally approvals are not a big problem.
I noticed a process similar to this where bugs from production would appear to 'migrate' from tested scenarios to untested scenarios.
We'd start off with UI tests on a browser, for example, and then the bugs would be clamped down on there but would seem now to crop up in API interactions or untested browsers. Then we started accommodating the tests to handle different browsers and mocking API interactions and the bugs would start cropping up somewhere else.
What was counterintuitive was that, even though code coverage metrics were really quite low, most bugs cropped up in areas of the code with automated test coverage. "Environmental" coverage seemed to matter much, much more.
https://en.wikipedia.org/wiki/Sorcerer%27s_Apprentice_Syndro...
What I used to do for demos was to automate the manual processes of ITIL style change review including diffs of the code, test plans executed, test coverage, etc. and the dependency graph of CI impacted by a change (because CMDBs are broken in 99.9% of orgs, you need tools like CloudFormation, Terraform, etc. to give the granularity necessary for a thorough review even in bureaucratic hell). All the other parts of dealing with bureaucracy is pretty much filling out other fields like a list of approvers, signed commits, org, billing codes, etc. are all a matter of trivia rather than smarts.
Your changesets need to become higher grained enough to warrant all the human eyes involved. But going backwards like that in processes is usually a sign that a place that is in decline though so that alone should be setting off warnings.
The solution, of course, is more bureaucracy!
And it worked, sort of. Everyone spends all the time writing documents asking for permission to deploy software changes rather than coding, so there's less changes overall, leading to less incidents. Never mind that velocity is a fraction of what it was or might have been.
In short, management wants to solve the problem in a way they understand rather than a way that works. And they love a way that has them micromanage everything and nit-pick when you didn't fill out the paperwork correctly.
Now, I should caveat all this- I'm a terrible pessimist sometimes and also I haven't had any caffeine today which can only make things worse.
These people need to create a veil of importance. They will create multi-level approval process. they will add QA team in India and customer signoff. When something happens blame is still on developers.
I find often when developers think something that is process driven like this isn't necessary it's because they're not thinking outside their own direct and immediate concerns.
The way I see it this is a communication feedback loop much like the one between tester and developer or product manager and developer and leaving that gap open means you're one step further away continuous delivery.
I don't think it's unreasonable for customers to be somewhat distrustful of us, their black box that spits out code.
I often think that management was transplanted into the foreign ground of software development and have no clue. They will then come with platinum quarterly releases were testing cost more than development.