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

Unable to install Theia Plugins #13349

Closed
vitaliy-guliy opened this issue May 16, 2019 · 11 comments
Closed

Unable to install Theia Plugins #13349

vitaliy-guliy opened this issue May 16, 2019 · 11 comments
Assignees
Labels
severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.

Comments

@vitaliy-guliy
Copy link
Contributor

Description

It looks after merging the PR installing of Theia Plugins become impossible. All Theia plugins configured in workspace config are handled as VS Code extensions and downloaded in /plugins directory with wrong extension.

Screenshot below displays logs of plugin broker while installing the plugins
Screenshot from 2019-05-16 16-57-46

A plugin eclipse-che/tree-view-sample-plugin/0.0.1 is a Theia plugin temporary stored on github in https://raw.githubusercontent.com/vitaliy-guliy/che-theia-plugin-registry/master/plugins/eclipse-che/tree-view-sample-plugin/0.0.1/meta.yaml

I opened terminal for theia-ide container and listed /plugins directory
Screenshot from 2019-05-16 17-40-40

Blocks #12905

Reproduction Steps

  • Install che-omnisharp-plugin plugin got from plugin registry by adding redhat-developer/che-omnisharp-plugin/0.0.1 to workspace configuration

  • install custom tree-view-sample-plugin plugin built from che-theia-samples by adding https://raw.githubusercontent.com/vitaliy-guliy/che-theia-plugin-registry/master/plugins/eclipse-che/tree-view-sample-plugin/0.0.1 to workspace configuratoin

OS and version:

Diagnostics:

@vitaliy-guliy vitaliy-guliy added the severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. label May 16, 2019
@davidfestal
Copy link
Contributor

@vitaliy-guliy could explain how it blocks #12905 ?

Is the problem only that without a .theia extension the Theia IDE doesn't take the extension in account ?
Or is the problem only that the log lines don't differentiate between Theia plugins and VsCode plugins ?

@vitaliy-guliy
Copy link
Contributor Author

vitaliy-guliy commented May 17, 2019

@davidfestal I'm able to continue working on #12905 but I cannot test how installed Theia plugin works. I add/remove plugins to/from attributes in workspace config and need to restart workspace to apply changes.
When restarting a workspace I see the wrong output informing me that my Theia plugin is VS Code extension. But it's not a problem.
The problem is Theia plugin is downloaded in /plugins directory with wrong extension and is not deployed by Theia.

You can reproduce the problem by adding a Theia plugin to workspace config.

@vitaliy-guliy
Copy link
Contributor Author

@davidfestal Cold you check this meta.yaml for Theia plugin.

apiVersion: v2
publisher: eclipse-che
name: tree-view-sample-plugin
version: 0.0.1
type: Theia plugin
displayName: Tree View Sample Plugin
title: Tree View Plugin example for Theia
description: Tree View backend plugin example for Theia.
icon: https://raw.githubusercontent.com/vitaliy-guliy/che-theia-plugin-registry/master/icons/tree.png
repository: https://github.com/eclipse/che-theia-samples/tree/master/samples/hello-world-frontend-plugin
category: Samples
firstPublicationDate: "2019-03-13"
latestUpdateDate: "2019-04-09"
spec:
  extensions:
    - https://github.com/vitaliy-guliy/che-theia-plugin-registry/releases/download/0.0.1/tree_view_sample_plugin.theia

I suppose Theia plugin has to be configured somehow differently, not by spec/extension

@amisevsk
Copy link
Contributor

@vitaliy-guliy No, that's the current configuration, something was lost in that PR when we merged it (theia plugins are processed identically to VS Code plugins). Everything works if we preserve file extensions (giving theia plugins .theia extensions) AFIACT and I'm working on a PR to fix this (should be done today).

I think the original idea was that both Theia and VS Code plugins can include .theia and .vsix files in the extensions field (since we don't really need to do much differently between cases.

@vitaliy-guliy
Copy link
Contributor Author

I have just tested the plugin broker with David image

 - name: CHE_WORKSPACE_PLUGIN__BROKER_UNIFIED_IMAGE
   value: 'quay.io/dfestal/che-unified-plugin-broker:fix-rhche-1354'
 - name: CHE_WORKSPACE_PLUGIN__BROKER_INIT_IMAGE
   value: 'quay.io/dfestal/che-init-plugin-broker:fix-rhche-1354'

It works pretty fine for me. But I payed attention on the downloaded file name
Screenshot from 2019-05-17 13-34-38

Could we somehow make it shorter or name the file in format ${publisher}.${name}.${version}.theia ?

@davidfestal
Copy link
Contributor

Could we somehow make it shorter or name the file in format ${publisher}.${name}.${version}.theia ?

Well, the final part of the name, is filename of the extension downloaded by the URL.
Since there can be several extensions downloaded for one plugin, having a name that gathers both the plugin reference and the extension reference seems useful, no ?

@vitaliy-guliy
Copy link
Contributor Author

@davidfestal it's not critical for me. Let it be as you wrote.

@makandre
Copy link

Has this been fixed? I still appear to encounter it. What builds of which components do I need to have the fix?

@johnmcollier
Copy link
Contributor

johnmcollier commented May 29, 2019

@vitaliy-guliy @davidfestal
I'm still seeing this issue too, as @makandre says.

When loading a workplace with a Theia extension (using a devfile), the loading shows the following:

Starting Init Plugin Broker
Cleaning /plugins dir
Unified Che Plugin Broker
List of plugins and editors to install
- eclipse/che-machine-exec-plugin/0.0.1 - Che Plug-in with che-machine-exec service to provide creation terminal or tasks for Eclipse CHE workspace machines.
- john/my-plugin/0.0.1 - Enables iterative development and deployment in Che
- IBM/my-theia-plugin/0.0.1 - Tree View backend plugin example for Theia.
- eclipse/che-theia/next - Eclipse Theia, get the latest release each day.

Starting Che plugins and editor processing
Starting VS Code and Theia plugins processing
Downloading VS Code extension for plugin 'plugins/my-theia-plugin/0.0.1'
All plugins have been successfully processed

The line Downloading VS Code extension for plugin 'plugins/my-theia-plugin/0.0.1' shows, and the plugin doesn't show up in the list of installed plugins in Theia

I should also note that the workaround here: #13349 (comment) does work for me.

@makandre
Copy link

makandre commented May 29, 2019

... now magically it started to work :) I guess some backend processes finally kicked in?

I do still see Downloading VS Code extension for plugin 'my-theia-plugin tho.

On the fs, the filename looks like <my-theia-plugin>.<version>.<random-chars>.<my_theia_plugin>.theia

@amisevsk
Copy link
Contributor

@makandre Yes, the "magically" part is the versioning for the plugin broker.

On Che, you are likely using plugin broker v0.17, which automatically takes bugfix releases -- I just released v0.17.2 including David's fix (which was merged a bit ago but I forgot to make a release out of it).

The reason the filename in the filesystem is strange is mostly to avoid name collisions -- it shouldn't interfere with functionality. The reasoning behind it is that a single plugin could define multiple extensions, so the naming scheme is required. The reason you're seeing <my_theia_plugin> twice is because for theia plugins we try to append the original filename (to keep the extension).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.
Projects
None yet
Development

No branches or pull requests

5 participants