grafclouds.com / documents / insights / training / devops-challenges / flaky-ci-passes-locally

Tests Pass Locally, Fail in CI. Just Retry?

Beginner ~8 min read
CI/CD

Scenario

The test suite is green on every developer laptop but fails intermittently in CI. A look under the hood shows the usual suspects: dependency versions are not pinned, the CI runners use a different operating system than the laptops, several tests depend on the current date and time, and a few share temporary directories. Re-running a failed job often turns it green — which is exactly what people have started doing.

The Quick Fix on the Table

Make the workaround official: configure the pipeline to automatically retry failed jobs until they pass. The build goes green, releases stop getting blocked, and nobody has to dig through test internals.

Interview · Round 1

The quick fix is on the table and the room is waiting for your call. Would you sign off on it? Take a position and justify it — out loud or on paper — before revealing the analysis.