When teams adopt the stacking workflow, each new pull request (PR) can trigger its own set of CI tests. This not only increases the overall number of CI runs but also adds overhead from behind‐the-scenes rebasing and dependency checks. For teams that are scaling up their development, this can result in:
- Excessive CI runs
- Longer feedback loops
- Resource bottlenecks
How Graphite helps reduce CI costs
Graphite addresses these issues by intelligently deciding when a CI run is necessary and by optimizing the order and grouping of PR merges. Here’s how:
Graphite evaluates each pull request in the stack to determine if a full CI run is warranted. By skipping redundant tests—especially on mid-stack PRs that are trivially updated during rebases—Graphite minimizes unnecessary resource usage without compromising on quality. This selective testing strategy leads to:
- Cost efficiency: Fewer CI runs mean lower expenses on CI minutes.
- Faster feedback loops: Developers receive quicker test results, enabling rapid iteration.
- Better resource utilization: Only tests that add value are executed, reducing load on your CI infrastructure.
- Improved scalability: As your project and team grow, optimized CI keeps build times manageable.
Graphite takes CI optimization one step further with its powerful merge queue tool, which is designed to speed up the merging process while also reducing CI costs. The merge queue is stack-aware, meaning it understands the relationship between stacked PRs and can optimize their processing accordingly. There are three primary merge queue optimizations:
- Fast-forward merge: Runs CI on all PRs in a stack in parallel, eliminating sequential wait times and reducing redundant tests.
- Parallel CI on multiple stacks: Executes CI concurrently on several stacks by grouping PRs into temporary drafts, significantly speeding up merge times while ensuring atomicity.
- Batching: Processes multiple stacks as a single batch to minimize CI runs and efficiently isolate failures, lowering overall CI overhead.
Start reducing CI costs today
By combining intelligent CI optimizations with an advanced merge queue—as well as implementing strategies like fast-forward merge, parallel CI, and batching—Graphite minimizes redundant testing and accelerates your team’s merge process. Whether you’re managing a few PRs or a high-volume, stacked workflow, these optimizations will lead to cost savings, faster feedback loops, and a more efficient, scalable CI pipeline.
Ready to level-up your CI pipeline? Get started with Graphite:
- Schedule a demo to see Graphite in action
- Test Graphite out with a 30-day free trial