---
title: "Optimizing Our E2E Pipeline"
description: "Slack cut redundant frontend builds in its monorepo E2E pipeline by using `git diff` three-dot notation against `main` to detect whether a PR touches frontend code, and when it doesn't, serving a recent production frontend build from S3 through an internal CDN instead of rebuilding."
url: "https://swe.quest/articles/optimizing-our-e2e-pipeline-880da9c129e2726b"
canonical: "https://slack.engineering/speedup-e2e-testing/"
source: "Slack Engineering"
published: "2025-04-14"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["ci-cd","build-systems","testing","developer-productivity","cost-optimization"]
---

# Optimizing Our E2E Pipeline

A post on [Slack Engineering](https://swe.quest/sources/slack.md), published 2025-04-14, 5 min read, Case study. Original: [https://slack.engineering/speedup-e2e-testing/](https://slack.engineering/speedup-e2e-testing/)

## Summary

Slack cut redundant frontend builds in its monorepo E2E pipeline by using \`git diff\` three-dot notation against \`main\` to detect whether a PR touches frontend code, and when it doesn't, serving a recent production frontend build from S3 through an internal CDN instead of rebuilding. The check and artifact lookup take under 3 seconds across 100,000+ tracked files. Frontend build frequency dropped 60%, average build time fell from ~5 to ~2 minutes (from ~10 minutes at the start of the year, counting an earlier Webpack upgrade), several terabytes of monthly S3 storage were saved, and E2E test flakiness reached its lowest measured level.

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)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Developer productivity](https://swe.quest/tags/developer-productivity.md) (Engineering practices)
- [Cost optimization](https://swe.quest/tags/cost-optimization.md) (Reliability & operations)

## Prerequisites

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

## Keywords

Slack, git diff, AWS S3, Webpack, monorepo

## Related posts

- [The quest for the five minute deploy](https://swe.quest/articles/the-quest-for-the-five-minute-deploy-9b91763fbfd58020.md): incident.io · 2025-07-22 · Medium · 9 min read · CI/CD, Go, Build systems, Caching, Developer productivity
  incident.io cut CI/CD times by moving from a hosted provider, where a cold Go build cache made compiling 15,000+ tests across 350+ packages the bottleneck, to Buildkite running on three self-hosted 48-vCPU servers.
- [AI coding has made CI a bottleneck, so we reworked ours to keep up](https://swe.quest/articles/ai-coding-has-made-ci-a-bottleneck-so-we-reworked-ours-to-keep-up-1594c74d280c863b.md): Linear · 2026-09-21 · Medium · 8 min read · CI/CD, Developer productivity, Cost optimization, TypeScript, Performance engineering
  Linear cut pull request CI wait time from over 6 minutes to about 5 and halved runner time per test, even as its test suites nearly quadrupled.
- [Improving machine learning iteration speed with faster application build and packaging](https://swe.quest/articles/improving-machine-learning-iteration-speed-with-faster-application-build-and-76fe5935fe0be272.md): Meta Engineering · 2024-01-29 · Medium · 5 min read · Build systems, Developer productivity, ML platforms, Storage systems, Python
  Meta cut ML engineers' build and packaging overhead by double-digit percentages by tackling build non-determinism, pruning dependencies, and replacing monolithic XAR executables with an incremental Content Addressable Filesystem (CAF).
- [Build better software to build software better](https://swe.quest/articles/build-better-software-to-build-software-better-5c6078f2e1d6c4da.md): Slack Engineering · 2025-11-06 · Medium · 17 min read · Build systems, Developer productivity, CI/CD, Refactoring & migrations, Caching
  Slack cut the 60-minute build pipeline for Quip and Slack Canvas's backend by applying classic software engineering principles (hermetic, idempotent, granular units of work and clean separation of concerns) before adopting Bazel.
- [Optimizing Our Build Times by Migrating from Webpack to Rspack](https://swe.quest/articles/optimizing-our-build-times-by-migrating-from-webpack-to-rspack-0081a00fe51c01d6.md): Yelp Engineering · 2026-05-20 · Medium · 6 min read · Build systems, JavaScript, Frontend, Performance engineering, Refactoring & migrations
  Yelp moved its JavaScript monorepo builds from Webpack to Rspack and cut integration build time by about 52% on average.

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)
