Interview Prep/CI/CD/Pipeline Design and Architecture

Should every merge to main deploy to production automatically?

IntermediateProductionPipeline Design and Architecture
Answer

For stateless services with good test coverage, observability and automated rollback, yes, and it is the safest way to deploy because changes are small. Preconditions we require first: feature flags for incomplete work, backward-compatible migrations, a canary or progressive rollout, SLO-based automated rollback, and an on-call team that owns the service.

For regulated systems, shared databases or services lacking tests, we keep a manual approval but still automate everything else, so the human decision is a button click, not a runbook.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Pipeline Design and Architecture