Home / Companies / Graphite / Blog / Post Details
Content Deep Dive

How we built the first stack-aware merge queue (and why it matters)

Blog post from Graphite

Post Details
Company
Date Published
Author
Greg Foster
Word Count
3,457
Language
English
Hacker News Points
-
Summary

Engineering teams face challenges with merge conflicts and inefficiencies as they scale, which traditional merge queues fail to address effectively, especially with stacked pull requests. Graphite addressed this by developing a stack-aware merge queue that treats stacks as cohesive units rather than independent pull requests, allowing for faster, more efficient merging by validating entire stacks at once and handling failures intelligently. This system has led to significant improvements in merging times and developer productivity at companies like Ramp, Asana, and Shopify, as well as substantial CI cost savings. The solution involves technical innovations such as speculative execution, intelligent failure recovery, and partitioned queues, which reduce CI overhead, allow parallel processing, and improve scalability. This approach not only enhances performance but also positively impacts developer satisfaction by reducing merge-related stress and enabling better development workflows. By focusing on infrastructure that supports modern development practices, Graphite's stack-aware merge queue demonstrates how engineering teams can maintain velocity and quality as they grow.