8.5 Fail fast and quality gates
In short: A quality gate is a rule that blocks progress: "PR cannot merge if tests fail," "staging deploy needs health check 200," "prod needs approval.".
Fail fast — run cheap checks first (lint, unit tests) so you do not wait ten minutes for an image build only to discover a typo.
A quality gate is a rule that blocks progress: "PR cannot merge if tests fail," "staging deploy needs health check 200," "prod needs approval."
| Gate | Example |
|---|---|
| PR gate | Required status check on GitHub |
| Build gate | Non-zero test exit code fails the job |
| Deploy gate | Curl health must succeed after start |
| Prod gate | Manual approval or change ticket |
Tiny story. Priya's PR fails lint in 30 seconds. She fixes formatting locally, pushes again, and only then runs the heavier test job. The belt stopped early — good.
Ravindra Bagale's Tip
Gate sodun "I will fix later" merge karane — teams cha trust todte. Red build merge nako; flaky test asel tar quarantine + ticket, silent ignore nahi. Dhyan rakho!