close
The Wayback Machine - https://web.archive.org/web/20230227235922/https://github.com/github/vscode-codeql/issues/1077
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

When losing connection to a remote SSH connection, the query history is getting deleted #1077

Closed
matan7890 opened this issue Jan 16, 2022 · 2 comments
Labels
bug Something isn't working VSCode

Comments

@matan7890
Copy link

Describe the bug
When I lose connection/reconnect to my remote ssh machine (which holds a CodeQL DB and runs queries), I also lose all my queries in the query history window.
I believe this happens because the vs-code window is getting "refreshed" while trying to reconnect to the server, and for some reason there is no way I know of to backup the query history window to file (or something else persistent).
This behavior can cause lots of frustration and loss of time or even loss of data in case the original query is no longer available.

Version
The CodeQL and VS Code version in which the bug occurs.

CodeQL extension version: 1.5.9
CodeQL CLI version: 2.6.0 Platform: linux x64 (Be aware that this is related to the remote machine)

VSCODE version (this is my local version, on a Mac OS X):
Version: 1.63.2 (Universal)
Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3
Date: 2021-12-15T09:37:28.172Z (1 mo ago)
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 21.1.0

To reproduce

  1. Remote connect using vscode's Remote SSH connection to machine having codeql db (or create a small one)
  2. Run any kind of query on that db; Make sure the query was added to the query history
  3. Reconnect to that machine (by losing the network connection for example)
  4. The query history is empty...

Expected behavior
It would be great to at least hold the history-panel's data in case of a reconnection, though the best behavior can be to hold the history also when disconnecting and reconnecting later to the related machine.

Additional context
I'm not sure what is the behavior of the history-panel when not using a remote connection because I use CodeQL only on remote machines, but I believe it should at least "survive" a connection loss because it can be pretty frequent when using remote connections.
If there anything I can do to help fix this issue I will be glad to help.

Thank you very much!

@matan7890 matan7890 added the bug Something isn't working label Jan 16, 2022
@matan7890 matan7890 changed the title When losing connection to remote SSH connection, its query history is getting deleted When losing connection to a remote SSH connection, the query history is getting deleted Jan 16, 2022
@aeisenberg
Copy link
Contributor

Thanks for your issue report. At the moment, vscode-codeql does not keep any query history across restarts or reloads of the workspace. It is a feature we are considering, but it has not yet been scheduled.

@aeisenberg
Copy link
Contributor

This is now fixed since query history items are saved across restarts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working VSCode
Projects
None yet
Development

No branches or pull requests

2 participants