Learning center

How can we catch bugs that pass CI but break in production?

Find an assumption the test environment shares with the new code and production may violate. Common examples include a database upgraded ahead of production, an empty test dataset, or a rollout in which old and new workers overlap.

Reproduce the sequence CI skips#

Suppose CI creates a fresh database, applies every migration, then starts only the newest worker. A migration can remove a column and pass that test even though a previous worker still selects it. Start the previous worker against the migrated schema and exercise the query it uses during the overlap.

If the query fails, you have established a compatibility defect for those versions. To decide whether this release is exposed, find the deployed worker version and when the migration runs. Add the missing compatibility case to CI when the team supports that overlap. After deployment, verify which revision actually started. Try the PostgreSQL rollback exercise ยท Google Cloud Deploy verification

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading