Hi all -- Another strange behavior issue that som...
# report-bugs
m
Hi all -- Another strange behavior issue that some of the devs have been seeing (and it's a bit concerning). We've had a handful of devs that have experienced a failure when executing
gt create
and
gt m
, in a single command, if the CLI fails it will then delete the changes. I'm not positive of the actual error coming from the CLI, but given the recent downtime it is a bit concerning that a failure here would actually delete local changes.
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>
m
One of the devs recalls the error being "Gt failed to roll back"
The issue appears to be related to precommit hooks that run some lint checks and apply updates (prettier). This is causing the commit to fail and have to be reapplied, but the general feeling is that Graphite should be handling this better and obviously not dropping changes completely. I have the command results if you're curious, but dont want to just throw them in a public forum.
p
hey mike, can you run
gt create
and
gt m
and then run
gt feedback --with-debug-context <any message>
in your CLI so i can investigate further.
m
Thanks Josie. I"ve passed it along to the others to capture the output the next time they experience it. There was a change to the precommit workflow to stop applying updates (prettier) to work around the issue but the general feeling is it feels a bit broken for that workflow to result in the loss of all changes.
šŸ‘ 1
We actually ran into this again and had one of the dev send feedback. Let me know if there is anything more we can provide.
Copy code
Thank you for submitting gt feedback to Graphite.

šŸ’” gt feedback from cooper-armadin:
added files disappeared after gt c failed
(If applicable) To help us investigate, please send the following if you haven't already:
1. What were you trying to do, and what did you run into?
2. What was the state of your local branches (e.g. gt log short output, local vs. remote status, etc.)?
3. Does this happen consistently? Just to you or your team as well?
4. Is this a regression?
Here is the feedback we can give them in chat: 1. Cause & error: I staged ~10 new files and one modified file to a branch using
gt c -m "..."
. The error is below and the end result was the 1 modified file remained stage and all the new files were deleted. Command likely failed because precommit failed, but we explicitly do not have our precommit modify any code because we worried that was causing this issue
Copy code
ERROR: Command failed with error exit code 1:
git commit -m ... -q
2. State was: B(needs restack)->A->Main 3. Consistency: It has happened to at least 3 teammates. We have not found a consistent recreation 4. Unknown
p
thanks! i'll take a look and will report back my investigation
hey mike, it looks like my colleague answered via email to cooper. this is a known issue. a workaround would be to commit with
git commit
, then
gt trackgt create
so a hook failure doesn't tigger the
gt
rollback path.