Hi HN, weâre Spriha and Ankit, founders of MergeQueue (https://mergequeue.com/). We enable automatic merges for your Github Pull Requests, based on configurable rules you can set for each repo. These automated merges ensure you never have failing builds on master/main and save time on rebasing your feature branches.
If you have a monorepo where a big engineering team is regularly merging changes, the stability of the main branch degrades considerably. This happens because more engineers working on the same codebase introduce incompatible changes, causing builds to break even though their commits pass independently. Hereâs an example: https://blog.mergequeue.com/managing-github-merges-for-high-....
Github has a setting to restrict branches to be up to date before merging, but turning on that setting ends up forcing a rebase-athon within the team. This results in wasted time, and all too often, a stressful scramble to figure out what changes broke the build.
We had this problem in our previous company where we looked for a solution to automate the process. We found this paper [1] published by Uber to manage monorepos at scale and we built a lightweight version of that internally. It immediately eliminated the overhead of keeping builds healthy. After that, we decided to build a public version to save others from re-inventing the wheel.
We spoke to engineers at Airbnb, Stripe, Uber, Shopify, Quora and other large companies who have internally built similar tools, but teams who need such tools the most often donât have the bandwidth to dedicate developers to building and maintaining them.
MergeQueue (MQ) is a FIFO queue of Pull Requests (PRs) that works as a Github app. To use MQ as a developer, instead of merging manually, you just add a Github Label âmergequeueâ to the PR. MQ then takes care of the rest: it sequentially updates or rebases the branch, monitors the configured CI checks and eventually merges the changes. If the checks fail, it will dequeue the PR, add comments describing the reason and move to the next one. For high output teams, MQ also offers batch mode to run CI in parallel batches. If youâd like to learn more, thereâs a lot more here: https://mergequeue.com/documentation.
Currently, we are also piloting a way to manage âflakyâ (i.e. unreliable) tests through MQ. This integrates with your CI provider (we currently support CircleCI), analyses test results and flags the tests that fail inconsistently. When flaky tests are identified, MQ reruns the test depending on the configuration set.
We charge by usage in an organization, so for instance if your organization has 100 developers but only 20 of them use MQ, only those 20 will be billed. You can sign up for a free 14 day trial without a credit card. We also support single tenant or on-prem deployments, have webhooks to connect to your other apps, offer multi-queue support, and are SOC2 certified!
Weâd love for you to try MergeQueue and give us any feedback you have. If you've used something similar in the past, we're also curious to learn what problems you faced so we're better prepared for them ourselves :)
[1] https://eng.uber.com/research/keeping-master-green-at-scale/ - discussed at the time: Keeping master green at scale - https://news.ycombinator.com/item?id=19692820 - April 2019 (115 comments)
3 hours ago by eatonphil
Really dumb question while I'm trying to decide whether to use something like git vs. CRDTs to handle version control for user changes made in an app I'm working on: why do we even use git anymore for source code version control if we want behavior like this?
Nobody likes merge conflicts. We all want versioning. So long as we have versions at all why isn't the ideal interface for developing in teams something more like editing in Google docs? Why aren't we just doing that? Why are we still using systems that produce merge conflicts?
Hoping for insight from folks who have either done this themselves or looked into it.
Edit: one particularly nice feature of Google docs over Confluence is that in Google docs I can suggest changes that is somewhat akin to branches with git. I don't need to force my change through without review. This isn't a natural part of CRDTs, but it sounds like the nicest source control system might be CRDTs plus branches?
2 hours ago by ankitdce
Feels like this should be a post in itself! This is just my opinion so open to any push backs / comments.
IMO the main reasons for source control are: - having revisions / diffs that can be reviewed by someone else - while working independently in a distributed fashion - easy way to rollback to an older revision
I'm not too familiar with CRDTs, will add more comments after reading more about it, but let's take Google docs as example here. What if we were all writing code in Google docs, how would that turn out.
Google docs do a decent job of versioning, so the last point can still be satisfied. I think with a source code styled version of Google docs, one can easily tag versions and do rollbacks. The issue happens when collaborating. Just from my experience working in spreadsheets where > 10 users are actively trying to modify, overwriting each other becomes very common. You can argue that it might make it easy to also fix this, but what about running the code locally?
One would have to still take a snapshot - hope that it actually compiles. From my personal experience, while I'm writing code, it rarely compiles in the first attempt. So then we would really have to work on snapshots where we know it compiles. At that point, you are really creating "commits" and pushing it to the remote. I am not sure if we can really completely avoid conflicts in such model.
an hour ago by UweSchmidt
On the contrary, I for one am amazed how often no intervention is necessary on automatic merges, given how finnicky compilers are in general! If the teams are not ridiculously large and people mostly work on their own stuff and coordinate work on the "common" part, isn't it mostly good?
There are certainly usability issues with git but I wouldn't literally use Google docs with colored squiggly lines for the changes from Anne and Bob...
an hour ago by eatonphil
I don't mean literally Google docs but a storage system more like that than git. :)
2 hours ago by lifekaizen
Itâs a good question. Well, CRDTs are just an underlying data type that guarantee conflict free eventual consistency. That doesnât mean the result would be an English paragraph or buildable code, however. Then what git does really well that bare CRDTs donât are things like branching and local experimentation. Being intentional with commit points can also keep file sizes down, for a more real-time tool like Docs potentially every character change would be stored. CRDTs can have performance problems with things like file size growth.
For, your use case of user changes, CRDTs seem like a good option. It would be interesting to explore building a version control system on top of CRDTs, if done right it could have the benefits of git with less merge conflicts.
2 hours ago by oftenwrong
For user changes, a solution based on OT/CRDT may be appropriate.
For code, you need merge conflicts. Let me put it like this: Do concurrent edits in google docs always produce a valid and correct paragraph, with no grammatical errors, and that communicates the proper thoughts?
2 hours ago by eatonphil
If we need merge conflicts that must be manually resolved, how can this product being discussed exist?
If merge conflicts can be automatically resolved, why aren't we using a system that does operates like that under the hood rather than needing a product like this bolted on?
an hour ago by oftenwrong
There are ways to resolve merge conflicts automatically in some cases given some assumptions, but there is no way to resolve any given merge conflict without a system that can create a correct program. I won't bore you with the formal proof for this (especially since I have no idea how to construct such a proof). Consider that some merge conflicts require new code to be written to resolve them.
For example, here's an original program:
if(foo()) {
send_money_to_oftenwrong()
}
and here's a change we would like to merge: if(bar()) {
send_money_to_oftenwrong()
}
and here's a concurrent change we would like to merge: if(baz()) {
send_money_to_oftenwrong()
}
How do you produce the correct program from these conflicting changes?---
Also for example, an unsophisticated and unsound method for automatically resolving some merge conflicts:
1. Assume that if the build and tests succeed, the program is correct. (This is the most important bit)
2. Accept all non-conflicting changes.
3. For conflicting changes, accept one side of the conflict.
4. Build and test the result. If it succeeds, merge it.
5. Otherwise, attempt the same with the other side of the conflict. If it succeeds, merge it.
6. Otherwise, it cannot be merged automatically by this method.
Note that this approach could also apply to a CRDT-based merge.
2 hours ago by ankitdce
The product being discussed here doesn't solve the issue of merge conflicts itself, but rather of eventual consistency. Merge conflicts is only a part of it, and there are some heuristics that can be used to reduce those, but eventually require manual review. Perhaps with Github Copilot this can improve?
An example of the problem we are describing is explained here: https://blog.mergequeue.com/managing-github-merges-for-high-...
an hour ago by horse666
How does this compare to Mergify? https://mergify.io/
2 hours ago by jeremyis
A previous employer that underwent a massive multi-billon dollar migration to SOA (and then folks went too far and made everything a micro-service so had to rollup some work) basically because merging became too slow into our monorail as we got to ~O(1k) engineers. We had an in-house solution like this that we used for 2-3 years (and a worse version for years before that). What a great idea to productive it!
IMO the SOA migration simply due to merging was such a heavy-handed solution. If we could have made our MergeQueue way better, perhaps we could have avoided that multi-billion dollar (+ the rollback work) fiasco.
Congrats!
an hour ago by ankitdce
Wow, that's a great story, maybe we should quote that :) If you are open to sharing more of that experience, I would love to hear that. You can also directly email me at ankit[at]mergequeue[dot]com if you don't want to post publicly.
3 hours ago by h3mb3
How does this compare to Bors NG?
3 hours ago by spriha
bors solves a similar problem, but we've found that enterprises require a lot of additional features to get their dev teams to actually use it, so we've focused on those to make this production-ready. Specifically:
1. We focus on being "no-maintenance", since our primary value prop to customers is "you won't have to spend eng resources on merge problems any more". This means: a one-click "set and forget" install, no additional config files to maintain or DSL to learn, unlike bors.
2. We have all the security and access-control features you'd want (we're Soc2 compliant, offer on-prem etc). This is important since the product interacts with our customers' source code.
3. We offer various customizations on merge workflows to help our customers optimize the exact parameters they care about (eg: developer wait time vs CI costs vs time to identity bad PRs in a batch, optimistic merge heuristics etc)
4. We offer a whole host of useful analytics to show you merge bottlenecks. We initially just put these as a nice-to-have, but we've now got customers who use us specifically because of these analytics!
We're also constantly adding new features based on customer requests (for instance, the flaky test features we're piloting originally came from customer requests we kept hearing over and over!). Speaking of which, if there's something you'd like to see that you don't currently get from your existing system/bors, do let me know :)
an hour ago by rokob
This was my question too. I considered making a company out of Bors but didnât think it would work because Bors mostly just works.
an hour ago by spriha
Haha yeah we're that company- turns out there's actually a lot to do, especially when handling this at scale! come join us :)
2 hours ago by oracle2025
Can say from my professional experience, that this is definitely a problem worth solving.
2 hours ago by ankitdce
<3 curious where have you experience this the most? We are also trying to figure out at what point does the problem become acute.
2 hours ago by programmarchy
Hereâs one. I currently have about five or six small PRs open for bug fixes and minor features. However, theyâve languished a bit in review and havenât been merged yet. In the meantime, Iâve started a fairly significant refactor. Itâs not too complicated but involves moving files and changing some core structures. I am dreading having to rebase those open PRs!
3 hours ago by gscho
How does this compare to Shipit?
2 hours ago by spriha
similar to how we compare with bors, actually! https://news.ycombinator.com/item?id=27858794
tl;dr: Our goal is to be the absolute lowest-maintenance option for your team :)
2 hours ago by sdesol
I'm not your competitor, but I am trying to make software metrics a good thing for everybody (developers and leaders) and I'm not sure you can make a claim like the following on your landing page:
"Know your star developers."
with the limited analytics that you can gather from a pull request.an hour ago by spriha
Fair point! We definitely don't want our analytics to be used to enforce/incentivize arbitrary targets (we've seen those behaviors backfire so many times, unfortunately...). I'll update the language from "Keep a tab on your builds and merges. Know your star developers" to "Keep tabs on your builds, merges and developer activity".
4 hours ago by undefined
Daily digest email
Get a daily email with the the top stories from Hacker News. No spam, unsubscribe at any time.