This message was deleted.
# feature-requests
s
This message was deleted.
n
Hi @Ben Jaffe, if you use the Graphite MQ, instructions for that are located here!
If you have any other questions, @David Bradford is the expert here 🙂
b
Ah got it! So this exists, and is live, but only if we're using merge queue.
That's a harder sell, since not everyone on the team uses Graphite right now.
Is there a future world where you turn the label on for users who aren't using the merge queue?
d
the label works for all users, Github only, or Graphite
that's why we added it 🙂
b
but what if I'm not using the merge queue?
sorry, I mean,
we haven't restricted merging to the graphite bot, etc.
d
the experts can correct me here, but i think the idea is: 1. You can turn on and configure merge queue 2. Graphite users can use the merge queue natively from the web UI 3. all github only users can simply add a label to get merge when ready/merge functionality, even though they aren't currently using Graphite
b
If we're using MQ, do we need to prevent people from merging via the GitHub UI? Or can some people use MQ and others don't stack and do the normal Github thing?
I'd assumed that whatever magical shenanigans Graphite has to do for optimistics and batching require Graphite to be the controller of the history on
main
, and that doing merges to
main
outside of Graphite might break things.
d
great question, i'm not sure
but i agree w/ all you've said
reading the docs, it looks like there are ways to configure this https://graphite.dev/docs/merge-queue-configuration
b
OK, so the configuration requires the graphite bot to have permissions to merge to
main
. I'm still a bit hesitant though since the docs don't explicitly reassure that interop is supported and we won't run into big issues.
d
i agree this is a documentation gap (i posted to our docs channel about it)
b
Like, a few of the questions I have: 1. What happens if someone manually merges a PR that's in the Graphite merge queue? 2. What happens if someone merges a pr via Github that's at the bottom of the stack, and then the rest has automerge on? 3. More broadly, the Graphite UI has a good number of regressions which leads to people feeling bearish -- how comprehensively is this core merging behavior tested and solid?
(for #3, that's not a criticism, just an observation -- as a UI engineer, I know UI testing is kinda a different animal)
d
Catching up on this thread.
Is there a future world where you turn the label on for users who aren't using the merge queue?
Our label based merge is currently only supported for the graphite merge queue. You could make a feature request to support it for non-merge queue merges, but there is work that would need to be done for us to support that.
If we're using MQ, do we need to prevent people from merging via the GitHub UI? Or can some people use MQ and others don't stack and do the normal Github thing?
Our MQ will support this, but it is not recommended. It tend to result in a bad experience for MQ users. You get all the pain of a MQ with non of the benefits. What will happen is that as the MQ is merging a PR (or stack), if a PR is merged outside the MQ, the MQ merge will detect that and restart the merge on top of the change that was manually merged. If there is a lot of activity outside of the merge queue, this can result is in MQ merges taking a long time, potentially being "locked out" of merging. Basically non-MQ merge "skip the line".
What happens if someone manually merges a PR that's in the Graphite merge queue?
In the MQ we check to handle if PRs have already been merged. Those should handle PRs being manually merged like this. However, there are some race conditions (like someone manually merges after we have checked if the PR is merged but right before we attempt to merge) that could lead to us marking a merge as failed when it was already merged.
What happens if someone merges a pr via Github that's at the bottom of the stack, and then the rest has automerge on?
By "automerge" are you referring to our "merge when ready" functionality. I believe that should work, but @Jacob Gold has more familiarity with that functionality than me.
More broadly, the Graphite UI has a good number of regressions which leads to people feeling bearish -- how comprehensively is this core merging behavior tested and solid?
I personally have been on a mission the last few months to get our merge reliability as high as possible. At this point, it is fairly solid. We do have to work through github, which occasionally causes some instability, but we have even been able to workaround a lot of those issues. We have a dashboard with all the merge failures that have occurred that I review daily and as a team we review weekly. So if we do see any issues cropping up, we can quickly address them.
b
Wowwww, this is a wonderful and super comprehensive response, thank you! That last piece is very confidence-inspiring.
OK so just to confirm I understand @David Bradford: Let's say for the sake of argument that I turn on merge queue and I'm the only person using it. Everyone else is merging via Github. Let's also say that none of my PRs are time-sensitive. Is it true that the only expected downside for me is that my PRs might take a long time to merge, since they'll get punted to the end of the line until there's a gap? (And along with that, a marginal increase in the possibility of merge conflicts)... otherwise, I'm safe?
If that's true, it means that I (and others) can incrementally adopt Merge Queue for PRs that we don't care about the timeliness of, and then people will get used to the joys of
merge when ready
, and the appetite for moving towards the merge queue full-time will increase.
d
There are 2 caveats to that. (1) there is a timeout setting in the MQ, if you add a timeout you could potentially hit that will spinning on other merges passing you. (So you probably don't want to add a timeout in this situation). (2) there is a small window right now where our MQ thinks that a PR is ready to be merge, but a PR from github gets merged before we are able to actually perform the merge. In that case, we may fail the MQ merge. It will depend on how things are configured. The MQ has a setting called "fast forward merge" which requires the merge to have a linear history. So if another PR interrupts that history, the merge will fail. This is a situation we should be able to detect and retry, we just haven't implemented it yet. Once we do, then I don't know of anything else that might because issues.
b
Awesome, thank you David, this is all wonderful information! I'm sure you're all super busy with building, but I think this has all the bones of a really good blog post ❤️
🔥 1