code-server: [Bug]: code-server version not respected when installing extensions using CLI

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Safari 15.4
  • Local OS: macOS 12.3 (Monterey)
  • Remote OS: Debian bullseye
  • Remote Architecture: amd64
  • code-server --version: 4.2.0 693b1fac04524bb0e0cfbb93afc85702263329bb with Code 1.64.2

Steps to Reproduce

  1. Open code-server
  2. Install extension Jupyter
  3. Check version

Expected

2022.2.1010641114

Actual

2022.3.1000901801

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code?

  • I cannot reproduce this in VS Code.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (21 by maintainers)

Most upvoted comments

I have just rebuilt an image containing code-server v4.5.1:

code-server --install-extension ms-python.python

installs the latest compatible [release] versions:

  • Python v2022.10.1
  • Jupyter v2022.5.1001610507

I can not reproduce https://github.com/coder/code-server/issues/5031#issue-1180499379 with code-server v4.5.1.

Nice find! So it does sound like it’s upstream. Let us know what you find! Otherwise, we may be able to patch it on our side. At least, we’ll have an easy way to run integration tests once #5275 is merged.

I’m going to check at https://github.com/microsoft/vscode/issues if someone already filed an issue.

If considered an issue, this is upstream (microsoft/vscode). On a Machine (arch: x86_64) running docker:

docker run --rm -ti debian:bullseye

Within the container:

apt update \
  && apt install -y --no-install-recommends \
    ca-certificates \
    gnupg \
    libasound2 \
    libgbm1 \
    libgtk-3-0 \
    libnss3 \
    libsecret-1-0 \
    libxkbfile1 \
    libxshmfence1 \
    libxss1 \
    wget \
  && wget https://update.code.visualstudio.com/1.65.2/linux-deb-x64/stable \
   -O code_1.65.2-1646927742_amd64.deb \
  && dpkg -i code_1.65.2-1646927742_amd64.deb
useradd -ms /bin/bash coder \
  && su - coder

Executing

code --install-extension ms-toolsai.jupyter

results in

Installing extensions...
Installing extension 'ms-toolsai.jupyter'...
(node:4414) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `code --trace-deprecation ...` to show where the warning was created)
Extension 'ms-toolsai.jupyter' v2022.5.1001601848 was successfully installed.

👉 v2022.5.1001601848 of ms-toolsai.jupyter is not compatible with Code 1.65.2.

@jsjoeio Can I help in any way?

Ahh…just re-read the issue. So when installing extensions via the CLI, it doesn’t check if code-server (i.e. Code) is compatible in terms of version. Seems like we could probably reproduce this with a test 🤔

i.e. here is where we do “integration” tests: https://github.com/coder/code-server/blob/main/ci/build/test-standalone-release.sh#L17

We might be able to add another one there.

[code-server v4.4.0] Installation using the extension panel: Although showing incompatible versions for Python (2022.6.0) and Jupyter (2022.5.1001290443), the latest compatible versions are installed:

https://user-images.githubusercontent.com/20233085/167286380-52b213db-a033-4bcf-ab26-d2114c3ca69d.mp4

Screen-Recording_2022-05-08_log.txt

ℹ️ This behaviour is also true for code-server v4.3.0; I was just too lazy to follow through in https://github.com/coder/code-server/issues/5031#issuecomment-1100589326

The issue when using code-server --install-extension remains, though.

Please add this issue to the May 2022 milestone.

Does it show up in the Extensions panel and does it work?

Yes, it shows up in the extension panel:

code-server_jupyter-extension

No it doesn’t work properly. E.g. not listing [all] available kernels:

r-select-kernel_jupyter-2022 3 1000901801-python-2022 4 1

Whereas ms-toolsai.jupyter 2022.2.1010641114 does:

r-select-kernel_jupyter-2022 2 1010641114-python-2022 2 1924087327

For the time being, it is best to pin the version of this extension, e.g. code-server --install-extension ms-toolsai.jupyter@2022.2.1010641114.
ℹ️ See https://github.com/open-vsx/publish-extensions/issues/569#issuecomment-1081180840 ff.

Not an issue of code-server.