Software Engineering Standards: Rethinking CI/CD and Deployment Practices
On my morning ritual I hunt a goat and drink it bloods, before breakfast, I usually try to read one or two of Akita's blog posts. This morning I started with "Stop inventing excuses and do more deploys..." which I truly recommend your read (it's available in english too). So I will deliberate about it today and put a bit of my perspective and experience.
I really like Fabio Akita, a brazilian genius, which is very know on the Brazil software engineer community, he always "hit the same key" on his recommendations and standards.
Akita vision about the CI/CD
Automatized Tests, CI to run in every Push, Real rollback capacity, and observability to know when something broke.
If you think about it, almost all companies around the world are trying to follow it, but according to Akita they are failing on it (I agree). When you are working probably you witnessing this feeling: "something it's wrong, but you can't explain exactly what". Let me put it in a phrase to you:
The technology shouldn't be about do the same thing everyday, it's suppose to be about creating wonderful things everyday.
It's basically what you feel everyday that you spend giving maintence to the same docker instance that broke for unknow reason isn't?
Choosing a day for deploy it's a giantic mistake
A classic approach it's choosing a single day to deploy new features, after a long week of testing in preprod/dev. This type of deploys are the most used on big techs specially the tech born around dinossaurs age to 2010. I will comment specifically about this approaches:
Friday & Monday Deploys
Talking about a classic one: with fridays deploy (only on fridays if some thing broke, the people need to wake up early on saturday to fix it).
So the beloved mondays deploys same stuff, but know at least we are working in a fix on the weekday (and leaving what we have to do on the back burner).
A Big Tech mistake, the unicorns never would commit this mistake?
You can also think that it's choices are made usually for old Big Techs (as I said before) but accordly with my experience it's not. One of my latest contracts are made buy a medium company which has in they core the will for continuous deployment -> But on mondays only. OKAY IT WORKS, but they need an entire week to deploy and test new stuff which means: if you do something wrong you need to wait for a entire week to fix it. As you can agree: THIS IS A CR@P.

So what's the solution?
Although the deploy on friday neither monday aren't the solution, when then? it's simpler than you think: continuos! following not only Akita recommendation but another genius software engineers around world:
Just pay attention on 2 Cs of CI/CD stands for "Continuos" it's not that hard to try to get the best of it.
Every day, hour, minute, you should deploy new stuff, don't matter the weather or the P.O mood, what I mean it's basically: do your CI/CD well enough for you don't need to worry with: rollbacks; monitoring; tests; revision; feature flags; compliance. If you business or the place where you work still relies in manual process in any of this steps mentioned above, you are loosing too much time solving the same problems. Worst, you are problably tired of having to focus in other tasks not related too your main card.
Good bye war room meetings
Depending on call everyone to see how you messed up it's suppose to be gone.
How it will work then? simple breaking production/preprod should be part of the job, if someone goes wrong applies a quick patch and it will be done as soon you finish, not on the next week. It's how Akita mentionted too, the solutions sometimes aren't easy fixed, however it's strictly depends on your CI/CD process to mitigate this high level incidents in production, quoting Akita requirements (not optional):
- Unit Tests: covering all isolated logic.
- Scenary and Integraion Tests: Covering concurrency, partial fail and conflic, what the Unit Tests can't catch.
- CI/CD: which builds and tests every pull request, prefering to the platform that you really publish to.
- Automatic Hostile Revision before merge: like pr-audit that handle contribuitors's allegations as non verificated until proved.
- Feature Flag: to control the explosion range to how see the change first.
- Real Staging: with gate before some real user see the change.
- Quick Rollback Capacity: with git and container and observability to know when something went wrong.
- Extra Step: To compliance or financial or health enviroments a extra field: Scenario tests heavier, and a extra lock per fail lock identified. (I've no idea what it does mean sincerely, but I'll look for and bring back to you soon).
Appling this steps with help of AI to make all of it the most easy process will make the team mood improve and also improve the capacity of working in multiple tasks at same time (in my vision as a software engineer). It's better when everyone work knowing "if deployed it now and anything goes wrong I can easily fix it".
80/20. Ask the LLM to do a minimal review and ship it. If it breaks, revert (that’s what containers, git, etc. are for). If you can’t revert, your infra sucks, go fix it yesterday.
Simple like that, stop putting a lot of overthinking on the "AI risks" it's almost all bullsh#it. Your team will to thank you, trust me.
I know: it's not easy build the perfect CI/CD enviroment
Hard it's the world, I have to say and when you are building your own software you need to know:
It's not funny setting up it to each project, but it's necessary and you need to do it even when it it's hard, to be more precise your should do it because it's hard.
Part of this phrase was taken from the Akita's post but even never have putting it together I always feel that way: "The hard part it's that part you need to focus more" - I learn it with someone I was raised with.
I need to stop writing now V3 (The number update the amount of time until i finish it)
If u are following it please the next subjects (still on this post) will be deliberated the akita content below, i need to leave now, but it's a shame not finishing it at time to go shopping so I publish anyway.
Akita notes to talk about later
Sobre o primeiro ponto especificamente, vale abrir mais, porque “régua mais rígida” não pode ficar vago. Isso significa teste de cenário real, não só teste unitário. O próprio ai-memory tem mais de mil testes de integração espalhados pelos seus módulos, e a maioria não pergunta “essa função devolve o valor certo?”. Pergunta coisa como:
- o que acontece quando duas escritas concorrem pelo mesmo arquivo ao mesmo tempo;
- o que acontece quando o disco falha no meio de uma operação de exclusão;
- o que acontece quando duas sessões tentam consolidar o mesmo dado ao mesmo tempo;
- o que acontece quando o processo morre antes de terminar de escrever.
A revisão automática que sustenta tudo isso
Eu já detalhei minhas skills de revisão num artigo recente, então vou resumir aqui:
pr-auditaudita todo PR antes do merge com o princípio de evidence over narrative: nada do que o contribuidor escreveu é verdade até prova, com checklist hostil pra código malicioso, credencial exposta, quebra de semver e tentativa de prompt injection;iss-auditaplica a mesma desconfiança pra issue, nunca executando comando colado por quem reportou;github-resolutiontransforma o que foi aprovado em código mergeado, um ticket de cada vez, com teste de regressão escrito antes da correção, e a regra de que “slop é defeito”: sem abstração especulativa, sem TODO esquecido, sem enfraquecer teste pra passar mais rápido.