Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reloading the window triggered a change in ExtensionContext.storageUri #128237

Closed
eamodio opened this issue Jul 8, 2021 · 2 comments
Closed

Reloading the window triggered a change in ExtensionContext.storageUri #128237

eamodio opened this issue Jul 8, 2021 · 2 comments
Assignees
Labels
extension-host Extension host issues under-discussion Issue is under discussion for relevance, priority, approach
Milestone

Comments

@eamodio
Copy link
Contributor

eamodio commented Jul 8, 2021

Refs: #128234, b1b44a3, microsoft/vscode-remote-repositories-github#34

The Remote Repositories extension uses the storageUri to extract the workspace id, which it uses to track the remote repository an its metadata and changes. So, the change in b1b44a3 caused issues as this "id" now changed (because of the sometimes added -[0-9] suffix). I've fixed Remote Repositories to strip the -[0-9] suffix so this should be a non-issue for it going forward, but the scenario that trigged this bug (microsoft/vscode-remote-repositories-github#34) might still be an issue for others.

In Kai's case, he had a remote repository open in one window on the desktop with some uncommitted changes in it, and then reloaded the window (because of an extension update -- clicked reload from the extensions view). And when the workspace reloaded, all his uncommitted change were "lost". This happened because before the reload there was no -1 suffix on the storageUri, but after the workspace reload there was.

So unless there were actually 2 windows open to this workspace (which wasn't the case in this scenario) there shouldn't have been a -1 suffix added.

@alexdima alexdima added the candidate Issue identified as probable candidate for fixing in the next release label Jul 13, 2021
@alexdima alexdima added this to the June 2021 Recovery 2 milestone Jul 13, 2021
@alexdima
Copy link
Member

I presented the problem in today's standup and we decided that we do #128528 for the recovery release.

@alexdima alexdima removed the candidate Issue identified as probable candidate for fixing in the next release label Jul 13, 2021
@alexdima alexdima modified the milestones: August 2021, September 2021 Aug 26, 2021
@alexdima alexdima modified the milestones: September 2021, Backlog Sep 30, 2021
@alexdima alexdima added the under-discussion Issue is under discussion for relevance, priority, approach label Sep 30, 2021
@alexdima alexdima added the extension-host Extension host issues label Oct 15, 2021
@alexdima
Copy link
Member

See #128234 (comment)

@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extension-host Extension host issues under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

2 participants