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

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

Closed
3 tasks done
benz0li opened this issue Mar 25, 2022 · 21 comments
Closed
3 tasks done
Assignees
Labels
bug Something isn't working high-priority This issue needs to be resolved ASAP
Milestone

Comments

@benz0li
Copy link
Contributor

benz0li commented Mar 25, 2022

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 693b1fa 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

@benz0li benz0li added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Mar 25, 2022
@benz0li
Copy link
Contributor Author

benz0li commented Mar 25, 2022

Most probably related to eclipse/openvsx#436.

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 25, 2022

Oh wow, nice find! Subscribing to the eclipse issue you opened.

@benz0li
Copy link
Contributor Author

benz0li commented Mar 29, 2022

For the time being, it is best to pin the version of this extension, e.g. code-server --install-extension [email protected].
ℹ️ See open-vsx/publish-extensions#569 (comment) ff.

Not an issue of code-server.

@benz0li benz0li closed this as completed Mar 29, 2022
@benz0li benz0li changed the title [Bug]: Are pre-release versions of extensions installed by default? [Bug]: code-server version not respected when installing extensions Apr 15, 2022
@benz0li
Copy link
Contributor Author

benz0li commented Apr 15, 2022

It seems to be an issue of code-server.

Executing

code-server --install-extension ms-toolsai.jupyter

results in

Installing extensions...
Installing extension 'ms-toolsai.jupyter'...
Extension 'ms-toolsai.jupyter' v2022.3.1000901801 was successfully installed.

But v2022.3.1000901801 of ms-toolsai.jupyter is neither compatible with code-server 4.2.0 (Code 1.64.2) nor code-server 4.3.0 (Code 1.65.2):

curl https://open-vsx.org/api/-/query -H 'accept: application/json' -H 'content-type: application/json' -d '{"extensionId":"ms-toolsai.jupyter","extensionVersion":"2022.3.1000901801"}' | jq . 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2510    0  2435  100    75   1464     45  0:00:01  0:00:01 --:--:--  1511
{
  "extensions": [
    {
      "namespaceUrl": "https://open-vsx.org/api/ms-toolsai",
      "reviewsUrl": "https://open-vsx.org/api/ms-toolsai/jupyter/reviews",
      "files": {
        "download": "https://open-vsx.org/api/ms-toolsai/jupyter/2022.3.1000901801/file/ms-toolsai.jupyter-2022.3.1000901801.vsix",
        "manifest": "https://open-vsx.org/api/ms-toolsai/jupyter/2022.3.1000901801/file/package.json",
        "readme": "https://open-vsx.org/api/ms-toolsai/jupyter/2022.3.1000901801/file/README.md",
        "changelog": "https://open-vsx.org/api/ms-toolsai/jupyter/2022.3.1000901801/file/CHANGELOG.md",
        "license": "https://open-vsx.org/api/ms-toolsai/jupyter/2022.3.1000901801/file/LICENSE.txt",
        "icon": "https://open-vsx.org/api/ms-toolsai/jupyter/2022.3.1000901801/file/icon.png"
      },
      "name": "jupyter",
      "namespace": "ms-toolsai",
      "version": "2022.3.1000901801",
      "publishedBy": {
        "loginName": "open-vsx",
        "fullName": "Open VSX",
        "avatarUrl": "https://avatars0.githubusercontent.com/u/61870837?v=4",
        "homepage": "https://github.com/open-vsx",
        "provider": "github"
      },
      "verified": false,
      "unrelatedPublisher": true,
      "namespaceAccess": "restricted",
      "allVersions": {
        "latest": "https://open-vsx.org/api/ms-toolsai/jupyter/latest",
        "2022.3.1000901801": "https://open-vsx.org/api/ms-toolsai/jupyter/2022.3.1000901801"
      },
      "averageRating": 5,
      "downloadCount": 140513,
      "reviewCount": 1,
      "versionAlias": [
        "latest"
      ],
      "timestamp": "2022-03-29T20:55:43.309137Z",
      "preview": false,
      "displayName": "Jupyter",
      "description": "Jupyter notebook support, interactive programming and computing that supports Intellisense, debugging and more.",
      "engines": {
        "vscode": "^1.66.0"
      },
      "categories": [
        "Programming Languages",
        "Other",
        "Extension Packs",
        "Data Science",
        "Machine Learning",
        "Notebooks",
        "Visualization"
      ],
      "extensionKind": [
        "workspace"
      ],
      "tags": [
        "__ext_jl",
        "debuggers",
        "ipynb",
        "julia",
        "jupyter",
        "keybindings",
        "multi-root ready",
        "notebook",
        "notebookKernelJupyterNotebook",
        "python",
        "raw"
      ],
      "license": "MIT",
      "homepage": "https://github.com/Microsoft/vscode-jupyter",
      "repository": "https://github.com/Microsoft/vscode-jupyter.git",
      "bugs": "https://github.com/Microsoft/vscode-jupyter/issues",
      "galleryColor": "#ffffff",
      "galleryTheme": "light",
      "qna": "https://github.com/microsoft/vscode-jupyter/discussions",
      "dependencies": [],
      "bundledExtensions": [
        {
          "url": "https://open-vsx.org/api/ms-toolsai/jupyter-keymap",
          "namespace": "ms-toolsai",
          "extension": "jupyter-keymap"
        },
        {
          "url": "https://open-vsx.org/api/ms-toolsai/jupyter-renderers",
          "namespace": "ms-toolsai",
          "extension": "jupyter-renderers"
        }
      ]
    }
  ]
}

👉 v2022.3.1000901801 of ms-toolsai.jupyter is only compatible with Code 1.66.0 and later.

@benz0li benz0li reopened this Apr 15, 2022
@benz0li
Copy link
Contributor Author

benz0li commented Apr 15, 2022

FYI @fritterhoff

@jsjoeio jsjoeio added high-priority This issue needs to be resolved ASAP needs-investigation This issue needs to be further investigated and removed triage This issue needs to be triaged by a maintainer labels Apr 15, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Apr 15, 2022

@benz0li thank you for the detailed notes/logs! So the extension installs even when it shouldn't. Does it show up in the Extensions panel and does it work?

@benz0li
Copy link
Contributor Author

benz0li commented Apr 16, 2022

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

@benz0li
Copy link
Contributor Author

benz0li commented May 5, 2022

Please add this issue to the May 2022 milestone.

@benz0li
Copy link
Contributor Author

benz0li commented May 8, 2022

[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:

Screen-Recording_2022-05-08.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 #5031 (comment)...

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

@jsjoeio
Copy link
Contributor

jsjoeio commented May 9, 2022

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.

@benz0li benz0li changed the title [Bug]: code-server version not respected when installing extensions [Bug]: code-server version not respected when installing extensions using CLI May 18, 2022
@benz0li
Copy link
Contributor Author

benz0li commented May 24, 2022

@jsjoeio Can I help in any way?

@jsjoeio
Copy link
Contributor

jsjoeio commented May 24, 2022

That would be awesome! I don't know which part you're interested in, but here's how I was thinking of approaching it:

  1. write "integration test here to reproduce bug
  2. investigate why bug exists which means digging into how VS Code installs them via their CLI

@benz0li
Copy link
Contributor Author

benz0li commented Jun 24, 2022

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.

@benz0li
Copy link
Contributor Author

benz0li commented Jun 24, 2022

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

@jsjoeio
Copy link
Contributor

jsjoeio commented Jun 24, 2022

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.

@benz0li
Copy link
Contributor Author

benz0li commented Jun 25, 2022

Cross reference: microsoft/vscode#153201

@jsjoeio jsjoeio modified the milestones: June 2022, July 2022 Jun 28, 2022
@jsjoeio jsjoeio self-assigned this Jul 21, 2022
@benz0li
Copy link
Contributor Author

benz0li commented Jul 22, 2022

There was some back and forth at microsoft/vscode#153201 but microsoft/vscode#153201 (comment) will lead to an answer for sure.

@jsjoeio
Copy link
Contributor

jsjoeio commented Jul 22, 2022

Woohoo! I just subscribed to that issue.

@misskniss misskniss assigned code-asher and unassigned jsjoeio Jul 26, 2022
@benz0li
Copy link
Contributor Author

benz0li commented Jul 27, 2022

Neither code-server nor VS Code do install incompatible extension versions.

It is a printing issue in the CLI, though: microsoft/vscode#153201 (comment)

@benz0li benz0li closed this as completed Jul 27, 2022
@benz0li
Copy link
Contributor Author

benz0li commented Jul 27, 2022

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 #5031 (comment) with code-server v4.5.1.

@code-asher code-asher removed the needs-investigation This issue needs to be further investigated label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority This issue needs to be resolved ASAP
Projects
None yet
Development

No branches or pull requests

3 participants