Hi! We’ve been having multiple occasions where the...
# report-bugs
b
Hi! We’ve been having multiple occasions where the automatic re-stacking remotely is failing for no apparent reason then leading to a merge conflict, example of this happening is: https://app.graphite.dev/github/pr/hashintel/hash/7845 Is this supposed to happen and are there any other solutions to this happening except locally restacking?
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>
Hi Bilal, can you elaborate on where you see "failing for no apparent reason then leading to a merge conflict" and the workflow youre taking to get there? ie in graphite ui, merge PR 1 and 2 of stack (not 3 and 4). then in CLI running
gt sync
? Are you using github ui to do anything?
b
Nothing done in the GitHub UI, purely in the graphite UI, given a stack of 1 - 2, we tick both as “Merge when ready”, 1 merges into the trunk and then 2 fails to automatically rebase once completed.
p
Interesting. Do you have another example? the one you sent looks like it a) does not have the merge when ready checked, and b) is missing approvals
b
It is missing approvals because the merge conflict happened, previously it was both approved and had merge when ready ticked. Another example where it happened (although Tim from our team fixed it manually, was https://app.graphite.dev/github/pr/hashintel/hash/7841/)
p
When
merge when ready
is enabled, once the requirements are met (reviews and CI), and its parent PR merges successfully, then graphite attempts to rebase. A rebase failure can be caused by a merge conflict which needs to be resolved. The UI should indicate this explicitly. In the case of the PRs you shared: 7845 never had approval. You can see this in the Activity log. 7841 looks like it had approval a few times but the GH action dismissed it once more commits were added. For reference, the Activity tab is available from the ellipsis menu at the top of the PR page, or via the keyboard shortcut
3
!
b
Thank you for the clarification! Did not know the activity hub existed, seems like we got our wires crossed 🫣 Thanks for helping out and for the patience! I am guessing that automatic rebases only happen on
merge when ready
so that the remote does not disrupt local workflows?
p
this should happen automatically regardless of
merge when ready
being toggled. In the case it does not happen automatically, you'll see a
needs restack
message in the ui which youll need to checkout the branch and run
gt restack
which may require resolving conflicts.
b
Does that mean an automatic rebase should happen once approval is given regardless of the
merge when ready
state?
p
i means, an automatic restack should happen any time a downstack branch is merged to its trunk.