vscode-codeql
vscode-codeql copied to clipboard
When I connect to Codespace, CodeQL get installed, each time
It is simple on my side.
Each time I fire a codespace on my local Vscode editor, it starts a codeql installation even though the codeql was not updated or asked to ?
Installing CodeQL CLI: Downloading CodeQL CLI v2.17.0… [121.7 MB of 681.1 MB]
The question now is why ? what should be done ? how to omit that?
Hi @Sim4n6 , thanks for raising an issue.
Are you seeing the CodeQL CLI get installed every time you connect to a pre-existing Codespace, or just when you create a new one? For new Codespaces we have to download the CLI to install it since it is stored in the Codespace storage.
Pré existing one.
Thanks for clarifying. One more question, do you have the CodeQL extension installed globally or do you use VS Code Settings sync, syncing your extensions and settings to all Codespaces?
Hi @Sim4n6! Another few questions to help us look into this! Are you seeing this in all codespaces, or is it specific to just a single repository? And could you share the .devcontainer
definition you're using, if it's a custom one? In particular, if you're doing anything with CodeQL as part of the setup of the codespace...
I will do that tonight
I've got something interesting the followinfg error message
Starting GitHub.vscode-codeql extension
The CodeQL executable path is specified as "/home/sim4n6/CodeQL-Home/codeql-cli/codeql" by a configuration setting, but a CodeQL executable could not be found at that path. Please check that a CodeQL executable exists at the specified path or remove the setting.
The CodeQL executable path is specified as "/home/sim4n6/CodeQL-Home/codeql-cli/codeql" by a configuration setting, but a CodeQL executable could not be found at that path. Please check that a CodeQL executable exists at the specified path or remove the setting.
WARNING: Expected to find a CodeQL CLI executable at /home/codespace/.vscode-remote/data/User/globalStorage/github.vscode-codeql/distribution14/codeql/codeql but one was not found. Will try PATH.
Searching for latest release including codeql-linux64.zip.
The CodeQL executable path is specified as "/home/sim4n6/CodeQL-Home/codeql-cli/codeql" by a configuration setting, but a CodeQL executable could not be found at that path. Please check that a CodeQL executable exists at the specified path or remove the setting.
Extracting CodeQL CLI to /home/codespace/.vscode-remote/data/User/globalStorage/github.vscode-codeql/distribution15
And it starts installing CodeQL each time I fire VSCode on Windows (latest stable release) and click on connect to Codespace (via down left corner remote btn) Select a running Codespace 'NAME'.
Content of .devcontainer/devcontainer.json file:
{
"extensions": [
"rust-lang.rust-analyzer",
"bungcip.better-toml",
"github.vscode-codeql",
"hbenl.vscode-test-explorer",
"ms-vscode.test-adapter-converter",
"slevesque.vscode-zipexplorer"
],
"settings": {
"files.watcherExclude": {
"**/target/**": true
},
"codeQL.runningQueries.memory": 2048
}
}
- Settings Sync is ON.
I hope I answered your questions, pleasE?
Settings === @ext:GitHub.vscode-codeql ...
This is the root cause.
@Sim4n6 👋 hello! I am trying to reproduce the issue. I was wondering if you could share if the CLI executable path you screenshotted above was set in the User
or Workspace
part of settings?
When I try to reproduce in either of those locations, on creation of the codespace I get the same log message you pasted above and CodeQL is installed. When I stop and reconnect to the codespace, however, instead of getting the installation again, I get a CodeQL CLI is installed externally so could not be updated
error message and I have to remove the setting in order to use the extension. 🤔
Also, could you share which version of the CodeQL CLI extension you're using, and which version of the Codespaces extension?
Thank you!
User
part.
Here is the content of settings.json on User
when I use VSCode from a Windows OS.
{
"git.autofetch": true,
"codeQL.telemetry.enableTelemetry": false,
"codeQL.cli.executablePath": "/home/sim4n6/CodeQL-Home/codeql-cli/codeql", # this is the problematic one
"workbench.colorTheme": "Quiet Light",
"window.zoomLevel": 1,
"remote.SSH.remotePlatform": {
"143.x.x.x": "linux"
},
"githubPullRequests.pullBranch": "never",
"github.copilot.advanced": {
}
}
I also have a Linux local setup where the user's home is /home/sim4n6/
and the external CodeQL installation of mine in Linux is at ~/CodeQL-Home
. But the behavior was last reported from the Windows side...
Name: CodeQL
Id: GitHub.vscode-codeql
Description: CodeQL for Visual Studio Code
Version: 1.12.5
Publisher: GitHub
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-codeql
and
Name: GitHub Codespaces
Id: GitHub.codespaces
Description: Your instant dev environment
Version: 1.16.19
Publisher: GitHub
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces
I think something is different right away. I started getting The CodeQL CLI could not be found.
I believe you released some fix right ? because the WARNING that was showing up at https://github.com/github/vscode-codeql/issues/3560#issuecomment-2061523295 is different, I'm getting this error this time:
Starting GitHub.vscode-codeql extension
The CodeQL executable path is specified as "/home/sim4n6/CodeQL-Home/codeql-cli/codeql" by a configuration setting, but a CodeQL executable could not be found at that path. Please check that a CodeQL executable exists at the specified path or remove the setting.
The CodeQL executable path is specified as "/home/sim4n6/CodeQL-Home/codeql-cli/codeql" by a configuration setting, but a CodeQL executable could not be found at that path. Please check that a CodeQL executable exists at the specified path or remove the setting.
The CodeQL executable path is specified as "/home/sim4n6/CodeQL-Home/codeql-cli/codeql" by a configuration setting, but a CodeQL executable could not be found at that path. Please check that a CodeQL executable exists at the specified path or remove the setting.
CodeQL CLI is installed externally so could not be updated.
The CodeQL executable path is specified as "/home/sim4n6/CodeQL-Home/codeql-cli/codeql" by a configuration setting, but a CodeQL executable could not be found at that path. Please check that a CodeQL executable exists at the specified path or remove the setting.
The CodeQL CLI could not be found.
wait, it does happen occasionally when the VSCode ext is reloaded ...
the issue persists please feel free to ask me further questions ...
I was able to reproduce this. I wonder if we need to add "ignoreSync": true,
to the configuration property here. I'm pretty sure this used to work. I'm not sure what's changed. The setting is marked as Not synced, so not sure why it is getting synced.
OK...so I'm not crazy. Looks like this is a bug in vscode. See https://github.com/microsoft/vscode/issues/210363. If you feel like it, you can comment on it just to let the team know that there are others affected by it.
Much bromance sent from this part of the globe 🌐
https://github.com/microsoft/vscode/issues/210363 is now fixed. The fix will go to vscode insiders edition first and then into a general release. I don't know when this will be, but it may not be until August that it is generally available (I'm not familiar with the vscode release cycle).
Perfect.