Hey Graphite team, We recently discovered an issu...
# report-bugs
l
Hey Graphite team, We recently discovered an issue where Graphite was attempting to merge PRs without required approvals when using GitHub's "revert" button. Issue details: • When a developer used GitHub's "revert" button to create a revert PR and added the "ready to merge" label (which we use for our merge queue) • Graphite automatically added it to the merge queue and attempted to merge it without any approvals, despite our branch protection rules requiring approvals • Once our developer realised what was happening, they manually removed it from the merge queue Our temporary mitigation: We've removed the Graphite App (graphite-app) from the "Allow specified actors to bypass required pull requests" setting in our branch protection rules. I believe this will resolve the issue, but would be good if you could confirm this. We enabled this setting originally based on your merge queue documentation recommendation (https://graphite.dev/docs/set-up-merge-queue#bypass-pr-permissions), but we don't have CI optimisations turned on. Is this expected behaviour when using GitHub's revert button with the "ready to merge" label? Or is this a bug? Thanks
p
(If applicable) To help us repro, please send the following if you haven't already: - PR links, screenshots, and/or debug output if applicable - Repro steps - Does this happen consistently? Just to you or others on your team also? - Is this a regression? Is the problem new? - If you're having an issue with the CLI, please send us debug logs using
gt feedback --with-debug-context <any message>
Hey Lachie, I'm really sorry you're running into this. Thank you for the detailed description.
Require a pull request before merging
refers to the rule that people can't directly push to the master branch - if someone wants to merge changes into master, they need to create a PR on a different branch first. I checked your merge queue settings and it looks like you're using Fast-Forward merge. This will no longer work if you remove Graphite from
Allow specified actors to bypass required pull requests
. A mitigation step you can take for now is to turn off fast-forward merge and remove Graphite from
Allow specified actors to bypass required PRs
, but this will make your merge queue slower. This seems like a bug... I'm raising this to the team now to see what the problem might be. Please hold tight as we investigate this!
Btw, if you have the link to the PR that this happened for, that would be helpful!
l
Hey @Meilinda Sun, apologies for the delay here. • The affected PR was https://app.graphite.dev/github/pr/cryptotaxcalculator/monorepo/4710 • Which was a revert of https://app.graphite.dev/github/pr/cryptotaxcalculator/monorepo/4648 Appreciate the clarification that this was a bug. I have applied that mitigation step.
p
Thank you! We'll take a look.