Sometimes the CLI changes the base branch to `grap...
# report-bugs
a
Sometimes the CLI changes the base branch to
graphite-base/[n]
. When does this happen? It sometimes breaks
gt get
afterwards, because the CLI will error that the PR has not been created with Graphite. People are on the latest CLI version.
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>
a
Example: https://app.graphite.dev/github/pr/Quattio/intt-system/1292/fix-increase-attempts-for-rare-cases-where-it-takes-a-bit-longer (I’m going to fix this one manually now, because we need to keep delivering)
p
The TLDR of why we sometimes temporarily change the base branch to
graphite-base/*
is that sometimes we have to update both git and Github data. A straightforward example of this is using
gt move
to change where in the stack a PR is located. In this case, the actual git contents of the PR will be changed (the git commits belonging to the PR will have new IDs) and the base of the PR will be changing in GitHub. There is no way to atomically update both the git data and the GitHub data. Regardless of the order in which the data is updated, the PR will be in an inconsistent state for some period of time until the second data source is updated, such as pulling in changes that don't belong in the PR. Setting a temporary base branch is our workaround here. Once we finish the necessary operations, the base branch should be reset correctly. Could you run
gt feedback
the next time you run into an error where the PR has not been created with Graphite? I'm assuming these PRs were indeed created using
gt
?
a
Thanks for the thorough answer! I’ll be on the lookout, and I’ll be sure to run
gt feedback
if/when we run into the problem again.