Controversial opinion: 🌶️ I prefer for all quality checks to occur *before*...
Controversial opinion: 🌶️ I prefer for all quality checks to occur *before* merge.
Here's why.
Merging code that hasn't been fully quality checked leads to batching work. It means we need to maintain a long-lived environment (like QA, UAT, or Staging) to integration test all our changes. It means need more release overhead - we need to agree on a release cadence, release cutoff dates, etc.
This encourages developers to rush to hit release cutoff dates too. And it leads to devs getting pulled back into work days later if their code doesn't pass inspection in some other environment. 👎
In contrast, if all quality checks occur *before* merge, we can automatically deploy the code when it's merged. So all the release overhead above melts away.
No more batching, coordination overhead, release planning, etc. Code just automatically deploys to prod the moment we merge it, because we've already determined that it's good enough. 🔥
And with this workflow, if a bug happens to slip into prod, we can quickly fix it:
1. Write failing test
2. Fix the bug so the test passes
3. Merge to main, and it auto-deploys to prod
No ad-hoc "hot-fix" process required. Fixing a bug follows the same flow as any feature.