Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
https://insomnia.rest
Apache License 2.0
34.84k stars 1.97k forks source link

"Revert to latest commit" not working #7017

Open jeroen-pon opened 9 months ago

jeroen-pon commented 9 months ago

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

Ericaudran commented 9 months ago

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

jscul commented 9 months ago

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?

rpparas commented 9 months ago

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

image
xqwtsz commented 9 months ago

+1

michbsd commented 9 months ago

+1

gatzjames commented 9 months ago

@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.

jscul commented 9 months ago

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".

Max101 commented 9 months ago

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.

gatzjames commented 9 months ago

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

xqwtsz commented 9 months ago

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

gatzjames commented 9 months ago

👋 @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?

xqwtsz commented 9 months ago

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

gatzjames commented 9 months ago

🤔 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?

xqwtsz commented 9 months ago

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

Max101 commented 9 months ago

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?

gatzjames commented 9 months ago

@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 commented 9 months ago

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

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)

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.

mattburdumy commented 9 months ago

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.

Max101 commented 9 months ago

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

DSK9012 commented 9 months ago

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.

JennWescott commented 8 months ago

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.

adam-athian commented 8 months ago

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.

katepond-openly commented 7 months ago

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

JennWescott commented 7 months ago

+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!

katepond-openly commented 7 months ago

@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.

ct1735x commented 7 months ago

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.

thiago-negri commented 7 months ago

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

aryankarim commented 7 months ago

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

xqwtsz commented 7 months ago

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..

calebwaldner commented 6 months ago

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

alexanderkhitev commented 6 months ago

Hello! Any news/updates? Thanks

igaln commented 6 months ago

hello: Is there a local path where we can use git to discard changes rather than the UI?

joel-unifii commented 5 months ago

a blocked for me as well. still an issue in 9.2.0 on mac

mikewoostint commented 5 months ago

9.2.0 seems to have fixed this for me (on mac).

I had to:

I have also seen it work where I did not have to follow the last step (I assume that the changes I committed locally were the same as someone else committed to remote, so there wasn't any actual changes to push).

After this, I was able to work with my team with Insomnia again. Just make sure that everyone is on the same version as you.

cyberGibbsEHS commented 4 months ago

9.2.0 still broken on Windows. I had to downgrade to this version to get this to work:

Version: Insomnia 2023.1.0 Build date: 9/3/2023 OS: Windows_NT x64 10.0.22631 Electron: 22.0.0 Node: 16.17.1 V8: 10.8.168.20-electron.0 Architecture: x64

jgravatt-kardex commented 4 months ago

Thought I'd come along and confirm the solution by mikewoostint above also works on Windows 10 for version 9.2.0. Not ideal, and you don't really have to push your commits if you don't want, but it does let you work again.