eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.99k stars 1.19k forks source link

Enable installation of VSCode extensions from openvsx.org via the internal OpenVSX registry #23188

Open svor opened 1 month ago

svor commented 1 month ago

Is your task related to a problem? Please describe

This PR enables the setup of a private OpenVSX registry: https://github.com/eclipse/openvsx/pull/1011

Watch the screencast to see how it works: Deploy_on_OpenShift.webm

When configure Eclipse Che to use the custom OpenVSX registry, it's possible to see all extensions that are published into the internal registry and install them from the editor: screenshot-internal-openvsx_apps_rosa_yokgv-wxv74-kjy_ezu8_p3_openshiftapps_com-2024_10_09-11_46_56 screenshot-eclipse-che_apps_rosa_yokgv-wxv74-kjy_ezu8_p3_openshiftapps_com-2024_10_09-12_15_26

In case the custom OpenVSX registry is configured to use https://open-vsx.org as an upstream registry (it's a part of application.yml server configuration file):

ovsx:
  databasesearch:
    enabled: false
  upstream:
    url: https://open-vsx.org

We can see all extensions (internal and from openvsx.org) in the custom OpenVSX UI page: screenshot-internal-openvsx_apps_rosa_yokgv-wxv74-kjy_ezu8_p3_openshiftapps_com-2024_10_09-12_28_05

But in Che we can NOT see them in the Extensions View: screenshot-devspaces_apps_rosa_nowi9-r8p69-p5j_y4d6_p3_openshiftapps_com-2024_10_08-15_18_14

Logs from openvsx-server pod:

2024-10-08T12:17:55.982Z ERROR [openvsx-server,f35c64024fd055f884121939131e09e2,66374e3386a84ad4] 1 --- [openvsx-server] [tp1853443923-20] [f35c64024fd055f884121939131e09e2-66374e3386a84ad4] o.e.o.adapter.UpstreamVSCodeService      : upstream: POST: https://open-vsx.org/vscode/gallery/extensionquery

org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://open-vsx.org/vscode/gallery/extensionquery": open-vsx.org:443 failed to respond
    at org.springframework.web.client.RestTemplate.createResourceAccessException(RestTemplate.java:915) ~[spring-web-6.1.5.jar:6.1.5]
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:895) ~[spring-web-6.1.5.jar:6.1.5]
    at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:730) ~[spring-web-6.1.5.jar:6.1.5]
    at org.eclipse.openvsx.adapter.UpstreamVSCodeService.extensionQuery(UpstreamVSCodeService.java:66) ~[classes/:na]
    at org.eclipse.openvsx.mirror.MirrorExtensionQueryRequestHandler.getResult(MirrorExtensionQueryRequestHandler.java:48) ~[classes/:na]
    at org.eclipse.openvsx.adapter.VSCodeAPI.extensionQuery(VSCodeAPI.java:68) ~[classes/:na]

Describe the solution you'd like

Extensions view should show extensions from upstream registry as well