Why deploys fail on Fridays
The candidate causes, ranked by how likely they are and how cheap they are to confirm.
Deploys of checkout-api fail about three times more often on Fridays than on any other weekday. This document does not name the cause. It lists every cause that fits the evidence and gives a plan to confirm or reject each one.
Assumptions
prod cluster. A deploy "fails" when the Argo rollout aborts or the post-deploy smoke test fails. Failure counts come from the last 12 weeks of pipeline runs. The pipeline did not change in that period.Failure rate by weekday
The pattern is a weekday effect, not a volume effect. Fridays carry the same number of deploys as Wednesdays but four times the failures. Thursdays are already above the Monday to Wednesday baseline, which points at something that builds through the week.
Deploy failure rate, last 12 weeks
Candidate causes
Each bone groups causes that share a mechanism. A cause belongs here only if it can explain why Friday differs from Thursday.
What would confirm each cause
A cause is confirmed by a signal that is present on failed Friday deploys and absent on successful ones. Most signals already exist in logs or metrics. Two of them need a change to the pipeline before they can be measured.
Evidence per cause
| Cause | Confirming signal | Where to look | Status |
|---|---|---|---|
| Batch size | Failed deploys carry more than 15 commits; successful ones carry fewer | GitHub deploy annotations | Can check now |
| Certificate rotation | Failures cluster at 13:00 to 13:30 UTC with TLS handshake errors | Argo rollout logs and cert-manager events | Can check now |
| Staging schema drift | Migration step fails in prod but passed in staging on the same commit | Migration job logs | Can check now |
| Index rebuild locks | Smoke test times out on order reads while pg_locks shows the rebuild | Postgres slow-query log | Can check now |
| Runner quota | Job queue time above 20 minutes on Friday only | GitHub Actions usage report | Can check now |
| Cache expiry | Cold build on Friday takes 2x the Thursday build | Build step durations | Can check now |
| Canary baseline | Canary aborts on latency while the new pods are healthy | Argo analysis run results | Needs baseline logging |
| Shallow review | Failed deploys have one approver; successful ones have two | Pull request metadata | Can check now |
| On-call handover | Failures start after 16:00 and no one acknowledges the rollout page | PagerDuty timeline | Can check now |
| Skipped soak | Staging soak shorter than 30 minutes on failed deploys | Pipeline step timestamps | Needs soak duration metric |
| Traffic peak | Failures track the 15:00 to 19:00 traffic ramp, not deploy time | Checkout RPS dashboard | Can check now |
Where to look first
Likelihood comes from how well each cause matches the Thursday rise and the Friday spike. Cost is the engineer hours needed to confirm or reject it. Start in the top left.
Likelihood against cost to confirm
Plan for the next two Fridays
The plan tests the cheap, likely causes first and adds the two missing metrics so the expensive causes become cheap the week after. Do not change the deploy process until a cause is confirmed; a process change now would hide the signal.
Confirm or reject
- 1Pull the failed-deploy set
Export every deploy from the last 12 weeks, failed and successful. Include commit count, start time, approver count, and soak duration.
bashgh api repos/acme/checkout-api/deployments --paginate > deploys.json - 2Split by batch size and time of day
Compare commit counts and start hours between the failed and successful sets. This rejects or confirms batch size, certificate rotation, on-call handover, and traffic peak in one pass.
If failures cluster at 13:00 UTC, stop here and check cert-manager events before anything else.
- 3Add the two missing metrics
Emit staging soak duration and the canary baseline window as pipeline annotations.
bashargo rollouts get rollout checkout-api -n prod --watch - 4Hold one Friday deploy to Thursday
Move one normal-size deploy from Friday to Thursday 14:00 and keep everything else the same. If it succeeds and the Friday deploys keep failing, the cause is the Friday environment. The change itself is not the cause.
This is a probe, not a policy. Do not adopt a Friday freeze from one data point.
- 5Write down the confirmed cause
Record the confirming signal and the rejected causes. The next investigation then starts from this list.