microsoft / microsoft/vscode-remote-release
Don't Save Corrupt data.json files when SSH errors
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
When running a remote-ssh connection, running servers of the correct version are looked for and if not found then a new server is created and its information stored in a data.json file in the /Library/Application Support/Code - Insiders/User/globalStorage folder. This ssh could potentially go down while this information is being saved and therefore all the information might not have been saved in the data.json file. This creates a bad file which if the remote-ssh extension finds it again, it will not be able to correctly parse the file. This data.json file is corrupt and needs to be deleted. Due to this potential error being made, and the lack of information in the logs outlining an error has occurred, makes it hard to debug. Additional guard rails should be included to ensure that no data.json file can be partially written and that necessary steps are taken if a ssh connection is broken during this process. In the end this lack of oversight leads to this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.