-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Support pinning extension version when installed from CLI #63903
Comments
This depends on availability of Storage Service in the cli process. @bpasero Let me know if it is feasible otherwise I would close it as a technical limitation. |
If main is already running there is a small chance that you see an error when reading items because the DB is in use. I assume you are not writing values right? |
I have to write into storage to ignore auto updating an extension. |
@sandy081 got it. In that case I would suggest to:
Reading should be fine from the CLI in either cases. |
Cool, Is there a way to check if cli is the only process running? |
@sandy081 maybe @joaomoreno knows |
When main starts up, the first thing it tries to create a socket for IPC. If it fails with CLI needs to join in on this dance. It should try to connect to that IPC channel. If successful, it should just tell that main what it should do. Else, it should do it itself, as quickly as possible. |
It seems that now, even if you install a specific older version via the GUI with "Install Another Version ...", VS Code will immediately auto update the extension to the latest version after a reload. Based on #12764 I assume this is a regression. I noticed this when I tried to rollback the PowerShell extension as the latest version broke auto-formatting. I don't know if I should open a new issue for that as this functionality seems to be universally broken now and not just CLI specific, but figured I'd comment here first. |
@Falconne Yeah it was broken and fixed it in insiders. |
I'm surprised this issue doesn't have more activity. I'm running into a related issue today. The latest ms-python extension no longer supports Python 2.7 so I need to ensure an older version of the extension is installed when I attach to some remote containers. As it stands, Code installs the latest Python extension (as well as the Jupyter extension, which I never use and cannot find a way to disable.) I then have to downgrade ms-python, uninstall ms-toolsai.jupyter and relaunch the connection. (At this point a (Note that I'm using Remote-SSH to connect to a remote host then using Remote-Containers to attach to containers on that host. It is lost on me if/how a |
This issue is really imporant for us as well. We have a safety critical development environment where we baseline our tools and roll it our as Docker Image + devcontainer.json. Because of this bug, the extensions are automatically updated on the user side. This comment by @lawrencegripper describes our problem clearly.
The problem becomes more severe when the extensions have two parts, an extension and a python based backend for it (like a language server). The frontend part of the extension easily runs out of sync because of the auto-update feature. We do not want to let users install the backend manually with a notification, as it can, for example, cause a lot of |
Dealing with this with omnisharp/C# extension. The team needs v1.23.16, but it installs the latest (currently v1.24.4) on container startup. To fix:
We use a devcontainer.json to install the extension, would like to put this, but it has no effect: |
This is crucial, anything we can do? |
We had the same issue lately. We got it working in VSCode version 1.68.1 with the following config in {
"settings": {
"extensions.autoUpdate": false,
"extensions.autoCheckUpdates": false
},
"extensions": [
"ms-dotnettools.csharp@1.23.16"
]
} |
@temparus Are you really sure? It does not work for me with 1.68.1 either. During the first startup, it installs the specifed extension, but then it autoupdates itself. |
@twodrops you're right. It only works properly on the first start of the devcontainer. So, when the container already exists when opening the project in the devcontainer, the auto-update kicks in. As a workaround, you can add an {
"initializeCommand": "docker rm <devcontainer-name>"
} This enforces that the container is rebuilt on startup. Building the actual container should not take long because the images and build layers are already in the cache. |
This is critical for us because we need to work with a Python2.7 Codebase and both the Python and Pylance Extension dropped support. Manually installing the older version is becoming a real pain... |
We are facing a similar situation where our codebase uses dotnet 3.1 but the official C# extension (https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp) does not support 3.1 anymore in their latest relase, hence an older extension version has to be used. (1.25.0 -> 1.24.4) |
I am facing the same issue here, it would be nice to be able to specify the extension version in the devcontainer.json the point of running vscode in a docker is to have a known environment Having to reload re-install the extension manually each time is a pain |
Follow up item from #12764
Do not trigger auto updates when a specific version of extension is installed from CLI
The text was updated successfully, but these errors were encountered: