Built with:Built with: Cavnue
Increasing Engineering Velocity at Cavnue with Trunk
Increasing Engineering Velocity at Cavnue with Trunk
Managing dozens of pull requests daily in a "monorepo-ish" structure with frequent manual rebasing and merge conflicts.
Maintaining a stable main branch amidst ~89,000 monthly lines of code changes and a 30-minute build/test cycle.
Development delays caused by outdated PRs and merge-related issues.
Automated merge queue with Trunk Merge, enabling seamless pull request merging after passing required checks.
Integrated Trunk Check to ensure deployment stability and maintain code quality with every merge.
Simplified developer workflows through automation and intuitive GitHub commands.
Streamlined high-volume PR merging with dozens of PRs merged daily.
Maintained a green and stable main branch by automating checks and merges.
Saved countless developer hours and reduced manual intervention in the merge process.
"With Trunk Merge Queue, I've helped enable many aspects of our development process that would've been otherwise challenging. Now, we can easily handle a high volume of changes without compromising on stability."
Cavnue, founded in 2020, is pioneering "smart roads" and transportation systems software to improve road safety and efficiency. With a lean team handling high-volume code changes across multiple repositories, Cavnue faced challenges in managing its growing codebases efficiently.
Total employees
Monorepos
PRs merged per month
Cavnue's growing team and ambitious development goals required a sophisticated approach to managing their codebase. Here's a closer look at their technical setup:
Version Control: GitHub
Repository Structure: A "monorepo-ish" setup with two primary monorepos and several smaller repositories
Build System: Pants with Bazel cache
Development Velocity: Over 200 pull requests per month, with approximately 89,000 lines of code changed
Daily PR Volume: Surging to dozens during peak periods
Build and Test Cycle: Averaging 30 minutes per iteration
This high-volume, fast-paced environment presented unique challenges in maintaining stability and efficiency. The combination of frequent code churn, long build times, and a complex repository structure made their manual merge process unsustainable. These pain points underscored the need for an automated solution, ultimately leading them to Trunk Merge Queue to streamline their workflows.
As Cavnue's team expanded to over 35 active code committers, their daily pull request volume surged into the dozens, making their manual merge process unsustainable. With a 30-minute build and test cycle and frequent code churn of around 89,000 lines changed monthly, the team struggled against several issues:
Constant need for manual rebasing
Time-consuming logical merge conflicts
Difficulty maintaining a stable main branch
Delays in the development pipeline due to merge-related issues
These challenges were compounded by their "monorepo-ish" repository structure and the high volume of changes. PRs were often out of date with the main branch by the time they were ready to merge, further slowing down the development process. This increasing complexity, coupled with their desire to boost development velocity, drove Cavnue to seek a robust, automated merge queue solution that could handle their high-volume environment.
Cavnue implemented Trunk Merge Queue to automate their code merges, addressing several key use cases:
Automating Approved Pull Requests: Trunk Merge Queue automatically merges approved pull requests after ensuring all required checks pass. This automation was crucial given Cavnue's high PR volume. Benjamin shared, "In the last week, we've had 43 pull requests merged.”
Maintaining Deployment Stability: Cavnue uses Trunk Merge in conjunction with Trunk Check to ensure code quality. Benjamin explained how they integrate these tools:
"We use the 'hold the line' feature quite a bit on Trunk Check. We're running that every time we do Trunk Merge in the merge queue. It's doing Trunk Check as our main thing we're really checking for to make sure it still passes after merge."
This approach helps Cavnue maintain a green, healthy main branch by ensuring that all code changes pass necessary checks before being merged.
Streamlining the Development Process: Trunk Merge Queue simplified Cavnue's workflow significantly. Pull requested no longer needed to be monitored with Trunk Merge Queue automating the merge and testing process. Benjamin shared, "We just tell people, 'Oh, you just do ‘/trunk merge’ or check the box,' and people get it after that. You check the box, your reviews come in, people approve it, and you move on."
Trunk Merge Queue has significantly improved Cavnue'smerge and deployment pipelines:
Increased merge efficiency, handling dozens of PRs per day during busy periods
Saved countless hours through automated merging
Improved main branch stability with automated checks and merges
Benjamin summarized the impact: "With Trunk Merge Queue, I've helped enable many aspects of our development process that would've been otherwise challenging. Now, we can easily handle a high volume of changes without compromising on stability."
Because the normal user experience of using Trunk Merge Queue doesn’t require ever leaving GitHub, Benjamin noted, "Every one of our developers knows what Trunk Check is. And Trunk Merge Queue is like this background process that not all of our developers would even know what it's doing or why. That's honestly kind of good because you don't think about things unless it breaks."
As Cavnue grows, they plan to use Trunk Flaky Tests to optimize their workflow to detect and fix flaky tests, which degrade confidence in CI, waste CI resources, and slow down code integration.
Benjamin expressed enthusiasm about this future possibility: "Today we hit tests that fail due to dependency issues fairly often. Trunk Flaky Tests could help us identify and fix them."
"We just tell people, 'Oh, you just do /trunk merge or check the box,' and people get it after that. You check the box, your reviews come in, people approve it, and you move on."
In Benjamin's words, summarizing their experience: "Trunk Merge Queue is stable, durable, and reliable. It allows your developer team to enable 'set it and forget it' merges, as well as offer stability for your deployments, ensuring that quality remains from the left all the way to the right on your workflows."
Cavnue's successful implementation of Trunk Merge Queue demonstrates how the right tools can significantly streamline development processes, even in complex, high-velocity environments. As they continue to innovate in the transportation technology sector, Trunk Merge Queue will play a crucial role in maintaining their development efficiency and code quality.