insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

"Revert to latest commit" not working

Open jeroen-pon opened this issue 1 year ago • 36 comments

Expected Behavior

"Revert to latest commit" should clear all changes that have not been committed yet and rollback to the latest commit.

Actual Behavior

If you click on "Revert to latest commit", nothing really happens and you still cannot pull changes.

Reproduction Steps

No response

Is there an existing issue for this?

Additional Information

No response

Insomnia Version

8.6.0

What operating system are you using?

macOS

Operating System Version

14.2.1

Installation method

Download

Last Known Working Insomnia version

No response

jeroen-pon avatar Jan 23 '24 07:01 jeroen-pon

Hello, same here, it worked before I updated to 8.6.0.

Workaround : You can downgrade your insomnia here https://github.com/Kong/insomnia/releases

Ericaudran avatar Jan 24 '24 13:01 Ericaudran

Seeing the same issue. Also not seeing the revert changes on "Create commit" page. I tried a clean install... same issue. How is it so difficult to simply revert to master?

jscul avatar Jan 25 '24 17:01 jscul

Re-installed v8.5.1, a build from December 2023. Still can't revert. Why is this software so buggy with every release??

image

rpparas avatar Jan 27 '24 00:01 rpparas

+1

xqwtsz avatar Jan 29 '24 13:01 xqwtsz

+1

michbsd avatar Jan 30 '24 12:01 michbsd

@jeroen-pon thanks for the issue. Working on a fix for the next patch release that's coming out soon. We also want to change the text to be "Undo all changes" instead of "Revert to latest commit". Curious about everyone's feedback on this.

gatzjames avatar Jan 31 '24 18:01 gatzjames

I like that idea. "Revert to latest commit" makes me think I'm reverting the master branch, not my local changes.

VSCode uses: "Discard All Changes" and "Undo Last Commit".

jscul avatar Feb 02 '24 05:02 jscul

Isnt this yet again a paid for feature that does not work? Guys in the past 3 months you have caused considerable developer downtime because of bugs like this one. You should do better.

Max101 avatar Feb 05 '24 20:02 Max101

Thanks for the feedback! This is out on the latest patch release.

gatzjames avatar Feb 06 '24 14:02 gatzjames

i'm using Version: Insomnia 8.6.1 and the issue is still there @gatzjames i also dont see any commits concerning this problem on the latest release

xqwtsz avatar Feb 06 '24 15:02 xqwtsz

👋 @xqwtsz all commits got squashed on develop but you can see the changes on the 8.6.1 commit 51b9ef76e9cb8859a09424ecb259d6904fb82744.

I can't seem to reproduce this issue happening still. Could you provide some context and the steps you follow?

gatzjames avatar Feb 06 '24 15:02 gatzjames

thanks for the response @gatzjames 🤓

Could you provide some context and the steps you follow?

i literally just go and click the new and shiny button "Discard all changes" and nothing happens

the tiny commit changes button is still yellow indicating that i still have changes, here is a gif of me doing it

Feb-06-2024 16-44-05

xqwtsz avatar Feb 06 '24 15:02 xqwtsz

🤔 I think this happens because even if you undo the changes there is some kind of migration happening on your data from the app. If you try to commit what types of objects are listed as changed?

gatzjames avatar Feb 06 '24 15:02 gatzjames

its just modified query params or changes in JSON Body key value pairs, that were changed to send different type of requests to test stuff on my local server, looks like this:

Screenshot 2024-02-06 at 16 51 04

xqwtsz avatar Feb 06 '24 15:02 xqwtsz

Other than having renamed the menu item Revert to latest commit nothing seems to have changed in 8.6.1. The issue remains there.

Should we file for another bug, and open a new issue as this should not have been closed?

Max101 avatar Feb 06 '24 20:02 Max101

@Max101 there was an issue where the action would get stuck in loading and you could press revert again with nothing happening. This was fixed by redirecting inside the action until the issue is resolved in our dep react-router. It appears there's another issue so I'm reopening to keep the thread and feedback everyone provided so we can properly fix this one too

gatzjames avatar Feb 07 '24 10:02 gatzjames

Update: After some debugging the issue is indeed related to migrated data.

  • Requests now have a new property pathParameters added to them.
  • When there is a rollback to the previous version that doesn't have these properties Insomnia will re-apply these properties based on the migration logic.

This should also apply for Unit Tests that are now sortable and have a new property (metaSortKey) or any previous data that got their schema extended throughout time (e.g. through rolling back to very old commit with a data structure that has evolved over time)

  • One solution could be that Insomnia commits these changes automatically as a Migrate to new data structure commit, but that has other trade-offs and could also be surprising for some users.
  • Another one would be to mark data as changed because of migration in the commit modal, but there's still a chance that the user has updated the data of an object and can be in both states.

Until we end up with better solution as a workaround you can commit these changes and Discard all changes should work properly going forward. Discard all changes will still discard all user updated data but after that any migrations will still update any related data and appear as changes that need to be commited.

gatzjames avatar Feb 07 '24 12:02 gatzjames

still stuck here too -- as a paid user which stinks. This workaround not working for me. Now I have commits I don't want to push, but cant delete.

mattburdumy avatar Feb 07 '24 17:02 mattburdumy

so what you are saying is that I should commit a ton of local changes to a repo 10 other people use, and then just for me things will work but the repo will end up with a bunch of garbage I used for my personal testing? I'm sorry but this is quite an upsetting situation

Max101 avatar Feb 09 '24 13:02 Max101

Facing the same issue, After upgrading to latest version, Not able to Undo/Revert the changes and due to which I'm not able to pull the changes.

DSK9012 avatar Feb 12 '24 06:02 DSK9012

I'm running into this issue as well and also created this ticket since it's causing me to not to be able to pull new commits. Pull is all I personally do since I test the APIs for the devs. So it's definitely a blocker for me at the moment as I was able pull commits on collections I did not have to disgard changes for.

JennWescott avatar Feb 16 '24 15:02 JennWescott

I could not find a workaround for this issue and needed to test new APIs to finish work that needs to be done yesterday. A collection I have only pulled once (the initial pull) did not allow me to pull commits, and didn't even show me requests so I think it had other issues.

I ended up having to do a completely clean install. I tried older versions, even clearing out some cache-like folders from the app data and couldn't find anything that helped with this problem, so here is the way I went about this.

Uninstall Insomnia. Make a backup of the app data, then delete all of the files (directory locations can be found here, depends on OS). Then install Insomnia again. You will have to re-authorize the app and re-pull your collections, but you should be back to work finally.

A request to devs (cc @gatzjames since you're in this thread, sorry) - please add a "delete collection locally" button/feature somewhere in the app! This probably would have saved me tons of time if I could start with a clean slate on a collection if I could just do it from the app.

adam-athian avatar Feb 16 '24 16:02 adam-athian

+1 Can not discard commits and can not pull commits on master on 8.6.1

katepond-openly avatar Mar 19 '24 23:03 katepond-openly

+1 Can not discard commits and can not pull commits on master on 8.6.1

@katepond-openly the only way I've got around this is to either 1. delete all insomnia files [including hidden files], uninstall and reinstall insomnia (but not great for long run) or 2. push my commit (i don't merge or whatever though) and then I can pull. I don't love #2 but it's what I just have to do to keep working. :) Hope that helps!

JennWescott avatar Mar 20 '24 13:03 JennWescott

@katepond-openly the only way I've got around this is to either 1. delete all insomnia files [including hidden files], uninstall and reinstall insomnia (but not great for long run) or 2. push my commit (i don't merge or whatever though) and then I can pull. I don't love #2 but it's what I just have to do to keep working. :) Hope that helps!

Thanks @JennWescott! I just want ahead and downgraded. It's what a lot of my team is doing atm.

katepond-openly avatar Mar 20 '24 16:03 katepond-openly

This bug is SOOOO annoying. As a full-time back-end developer, I spend a lot of time in Insomnia writing docs and (trying to) share stuff with my team and this makes my tasks go so much slower. Can't believe we still don't have a fix for that. We are actually considering moving to Postman because of this.

ct1735x avatar Mar 26 '24 08:03 ct1735x

+1, looking for alternatives, been dealing with sync issues all the time

thiago-negri avatar Mar 28 '24 12:03 thiago-negri

I've been having this issue for a long while now. After I press the button the URL flickers then nothing happens.

Version: Insomnia 8.6.1 Build date: 2/5/2024 OS: Windows_NT x64 10.0.22631 Electron: 28.0.0 Node: 18.18.2 Node ABI: 119 V8: 12.0.267.8-electron.0 Architecture: x64

aryankarim avatar Apr 04 '24 15:04 aryankarim

I managed to get my team to commit for the paid version of Insomnia, and made the case that "its going to be way easier to keep everyone in sync" and less work, 3 months in and still no fix for this bug.. its very disappointing..

xqwtsz avatar Apr 09 '24 10:04 xqwtsz

Version 9.0 doesn't seem to fix the issue...

calebwaldner avatar Apr 24 '24 19:04 calebwaldner