Contra

Improving developer velocity & efficiency through automation

Location

Remote

Customer since

Aug 26, 2022

Doug Schlenker

VP of Engineering

Company

Company

Contra is a professional networking platform designed to give everyone the freedom and opportunity to work independently. The company's platform provides flexible work opportunities via an exclusive community and referral network by showcasing work portfolios. Founded in 2019, Contra is a remote-only organization with employees located across the globe.

Challenges

Challenges

A consistently high volume of PRs merging

Manual process

Breakages on their main branch

What Was the Problem?

As a company, they are always looking for solutions to help them improve their work and developer experience. They heard about the merge queue concept and started looking to integrate it into their build process.‍

The challenges they faced:‍

  • A consistently high volume of PRs merging (from engineers & dependency updates). Contra deploys to production with every PR, and with an average count of 39 deployments per day and growing, they faced long merge times, especially during peak work hours. Thanks to Mergify's Batch and Speculative Checks features, they can have up to 15 PRs safely merged in a single commit and deployment, keeping queue times reasonable and engineers happy.‍

  • A Manual process. Contra recognizes that if things have to be done manually, ''I have to manually review this, ''I have to manually merge that,'' etc., it’s easy for things to get missed or happen slowly. That's a big deal for them because they tend to create a PR and ship it in less than one day, and their goal is to be able to do it even faster.‍

  • Breakages on their `main` branch. Merged regressions (pass on a branch, fail on `main`) are distracting and make it harder to deliver on our commitments. Having a merge queue in their branch that is testing the last changes of `main`, and then holding it, everything passes and then merges to `main`, so they don't have to test `main`. It's cool, but if they prefer to have everything tested in the merge queue, they don't need to test `main`, and they can run their final pre-flight checks before the deployment. It keeps it always green.

Mergify allows us more time to focus on our core product and build a better experience for our users.

Doug Schlenker

VP of Engineering

Contra's Workflow Now, Mergify Included

Today, their workflow starts with engineers picking a task in Linear. They create a PR branch and work through the requirements of the linear task.

They create a pull request when they are near completion. If they create the pull request before it's ready to review, it goes up as a draft, and when it's ready for review, they put it into the "ready for review" state.‍

They assign their GitHub team to it, and GitHub chooses the participant to review the code. Internal tools notify engineers to do the review, and once it’s reviewed and all of their status checks have passed, Mergify takes control to merge and deploy the PR automatically. Contra has a rule that if something is trivial in size (a couple of lines of code) and complexity, they can label the PR as “self-review”. If all status checks pass in GitHub, Mergify merges in automatically & deploys. With this process, there is a productivity incentive to ship small changes, and controls are in place to ensure the self-review process is used correctly.‍

When a hot-fix is needed to ship quickly to production, Contra uses a “hotfix” label and the PR goes into a special Mergify queue that has a higher priority so it will ship faster.‍

If a merge conflict occurs, Mergify automatically attaches a GitHub comment to the PR, which the pull request author sees within Slack in real time.

Spend a lot of time reading the documentation and learning the capabilities that can be unlocked in the mergify.yml. Out of the box, you have a simple basic merge bot but with time & experimentation, Mergify can adapt to your engineering processes and make everyone more productive.

Doug Schlenker

VP of Engineering

Gains

With Mergify’s automation and merge queues, Contra's engineering organization has dramatically increased its shipping velocity by automating the build, merge & deploy process of small, trivial PRs. This was a game-changer.‍

They also get automatic merging of passing PRs from Renovate (a dependency management tool) with Mergify. It significantly reduces the time sink incurred by dependency management.‍

Contra's engineers have dramatically reduced `main` breakages via the Mergify merge queue.‍Let's dive into some metrics:‍

  • Cycle time: 23 hours on average.‍

  • Throughput: 158/week. Their next goal is to hit 200 deployments in a week.‍

  • Merge time: 5 hrs on average (an area they are working on to improve)‍

  • Deployments: 39 deploys/day on average.‍

Overall, they have experienced time savings, which gives them more time to focus on their core product and build a better experience for their users.

Streamline your CI workflow

Streamline your CI workflow

Streamline your CI workflow

Streamline your CI workflow