---
title: "Balancing Safety and Velocity in CI/CD at Slack"
description: "Slack restructured CI for its Webapp monorepo from mostly pre-merge end-to-end testing into three tiers: a small pre-merge set (<1% of e2e tests) that blocks merges, a post-merge set (<10%) that blocks deploys, and a bi-hourly batched regression pipeline for low-criticality features."
url: "https://swe.quest/articles/balancing-safety-and-velocity-in-ci-cd-at-slack-cd559ba9ba4be498"
canonical: "https://slack.engineering/balancing-safety-and-velocity-in-ci-cd-at-slack/"
source: "Slack Engineering"
published: "2022-02-18"
difficulty: "medium"
kind: "Case study"
reading_minutes: 12
tags: ["ci-cd","testing","developer-productivity","deployment"]
---

# Balancing Safety and Velocity in CI/CD at Slack

A post on [Slack Engineering](https://swe.quest/sources/slack.md), published 2022-02-18, 12 min read, Case study. Original: [https://slack.engineering/balancing-safety-and-velocity-in-ci-cd-at-slack/](https://slack.engineering/balancing-safety-and-velocity-in-ci-cd-at-slack/)

## Summary

Slack restructured CI for its Webapp monorepo from mostly pre-merge end-to-end testing into three tiers: a small pre-merge set (\<1% of e2e tests) that blocks merges, a post-merge set (\<10%) that blocks deploys, and a bi-hourly batched regression pipeline for low-criticality features. The move was driven by the arithmetic of flakiness: even a 1% per-suite flake rate across 60+ suites meant most PRs hit a flaky failure. Consecutive-failure alerts based on a state machine, per-business-area triage channels with test ownership, and a Slack bot that spins up escalation channels with the right liaisons kept the change safe. Afterwards p95 test turnaround fell over 40% to under 18 minutes, per-PR flakiness dropped over 90% to under 5%, and customer-reported defects showed no measurable increase.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)

## Prerequisites

- CI/CD pipelines ([easy posts on CI/CD](https://swe.quest/tags/ci-cd.md?difficulty=easy))
- end-to-end testing ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))
- flaky tests

## Keywords

Slack, Webapp, Grafana, Cypress, Hack

## Related posts

- [Handling Flaky Tests at Scale: Auto Detection & Suppression](https://swe.quest/articles/handling-flaky-tests-at-scale-auto-detection-suppression-77980e444545e1fa.md): Slack Engineering · 2022-04-05 · Medium · 14 min read · Testing, CI/CD, Mobile, Developer productivity
  Slack's mobile DevXp team cut CI test job failures from 57% of failing builds to under 5% by automating flaky test detection and suppression across 27,000+ iOS and Android tests.
- [Slowing Down to Speed Up – Circuit Breakers for Slack’s CI/CD](https://swe.quest/articles/slowing-down-to-speed-up-circuit-breakers-for-slack-s-ci-cd-9aadbea59ffc838e.md): Slack Engineering · 2022-08-19 · Medium · 16 min read · Resilience, CI/CD, Developer productivity, Observability
  Slack added orchestration-level circuit breakers to Checkpoint, its CI/CD orchestration service, to stop cascading failures between internal systems such as GitHub Enterprise, Jenkins, test environments, Flannel, Vitess and search.
- [Mobile Developer Experience at Slack](https://swe.quest/articles/mobile-developer-experience-at-slack-f2b2b79d74a881fd.md): Slack Engineering · 2022-10-12 · Medium · 14 min read · Developer productivity, Mobile, CI/CD, Testing, Build systems
  A dedicated mobile Developer Experience team grew from 3 to 8 engineers and cut CI feedback time and failure rates by targeting the pain points that surveys, NPS and metrics like time to merge showed hurt developers most. iOS test time fell from about 50 minutes to an average of 9 by moving from Xcodebuild to Bazel with disk caching and bazel-diff, so only affected targets are tested.
- [Continuous Load Testing](https://swe.quest/articles/continuous-load-testing-cb6889189cd6bc8f.md): Slack Engineering · 2022-04-29 · Medium · 13 min read · Testing, Performance engineering, Resilience, Kubernetes, Deployment
  Slack moved to running its Koi Pond load-testing clients continuously, 24/7, against an organization 4x the size of its largest customer.
- [Deploy Safety: Reducing customer impact from change](https://swe.quest/articles/deploy-safety-reducing-customer-impact-from-change-bf60c2f10d4d0449.md): Slack Engineering · 2025-10-07 · Easy · 9 min read · Deployment, SRE, Incidents & postmortems, Engineering management
  Slack's Deploy Safety Program cut customer impact hours from change-triggered incidents by 90% from the 2024 peak, after finding that 73% of customer-facing incidents came from Slack's own changes, mostly code deploys.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
