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

Separate directory for VSCode extensions #180

Closed
wants to merge 1 commit into from

Conversation

vitaliy-guliy
Copy link
Contributor

@vitaliy-guliy vitaliy-guliy commented Jul 9, 2019

Signed-off-by: Vitaliy Gulyy vgulyy@redhat.com

What does this PR do?

For eclipse/che-theia/7.0.0-rc-3.0 and eclipse/che-theia/next

  • defines VSCODE_PLUGINS environment variable. It allow to install VS Code extensions to this directory.
  • persists this directory
  • adds /vscode-plugins to plugin sources
  • persists /home/theia/.theia directory to be able to store Theia settings and setting of some plugins/extensions

Is needed for eclipse-che/che#13834

Signed-off-by: Vitaliy Gulyy <vgulyy@redhat.com>
@sunix
Copy link
Contributor

sunix commented Jul 10, 2019

@vitaliy-guliy could you explain why this is needed ?
It means that we are persisting informations about installed plugins in volumes and not devfile.
what if i want to recreate a new workspace from the same devfile ? Won't have the plugins/extensions i have installed previously ?

@vitaliy-guliy
Copy link
Contributor Author

@sunix This is needed to persist VS Code extensions that has been installed by a command given from VS Code marketplace. Yes, the installed extension is not stored to the devfile and you cannot recreate your workspace with this extension. It works only for the current workspace. For now we don't have a solution how to describe such kind of plugins in devfile directly without defining external meta.yaml

@sunix
Copy link
Contributor

sunix commented Jul 10, 2019

@sunix This is needed to persist VS Code extensions that has been installed by a command given from VS Code marketplace. Yes, the installed extension is not stored to the devfile and you cannot recreate your workspace with this extension. It works only for the current workspace. For now we don't have a solution how to describe such kind of plugins in devfile directly without defining external meta.yaml

plz make a proposal in a new issue so we can do it in the devfile
Something like:

id: 'link to the vscode ext binary or vscode id',
type: vscode-ext

@l0rd
Copy link
Contributor

l0rd commented Jul 10, 2019

@vitaliy-guliy is this really related to eclipse-che/che#13747. Because you talked about making the panel work with the new devfile model and it doesn't look like this PR address that.

@vitaliy-guliy
Copy link
Contributor Author

@l0rd yes, you are right. It's a minor change and it was decided to do it withing fixing the plugins panel.
I have created a dedicated issue for that and fixed the PR description

@l0rd
Copy link
Contributor

l0rd commented Aug 22, 2019

@evidolob can you review this PR please?

Copy link
Contributor

@amisevsk amisevsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the plugin broker need a parallel change to accomodate this? How would compatability between older versions of che-theia work?

@vitaliy-guliy
Copy link
Contributor Author

@amisevsk we don't need to change the plugin broker. This option is only for installing a vscode extension by a command running inside Theia.
Let's say, if you want to insall Ruby extension https://marketplace.visualstudio.com/items?itemName=rebornix.Ruby you have to:

  • open a marketplace
  • copy an installation command ext install rebornix.Ruby, insert it to text/command field in the Plugin view
  • in case there is no installation command, you can easily drag this button to the Plugins view

There is a code in Theia using this environment variable.
https://github.com/theia-ide/theia/blob/master/packages/plugin-ext-vscode/src/node/plugin-vscode-resolver.ts#L45

If the variable is set, Theia will install a vscode extension to predefined directory. In our case (in this PR), this directory is also added to volumes. This is some kind of persistence to not lost the extensions when restarting.

See my demo video explaining the feature https://youtu.be/2_GPZb1_Hew?t=329

Copy link
Contributor

@amisevsk amisevsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Worth noting that installing plugins in this way will not persist between workspace starts when using ephemeral workspaces

Copy link
Contributor

@nickboldt nickboldt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickboldt
Copy link
Contributor

Is this PR still relevant? Tempted to close as out of date.

@vitaliy-guliy
Copy link
Contributor Author

It depends on what we prefer.

If we prefer to have a configuration in the devfile only, then we don't need this PR anymore. But then we have to create and issue to make it possible to specify/describe the vscode extension in the devfile directly without creating a separate meta.yaml.

If it's ok to have an ability to store the installed vscode extension in the persisted volume only, let's update this PR and merge.

As for me, I prefer the first option.

Anyway, we have already implemented the feature with extensions installing. But the extension will not be deployed immediately, only after restarting the workspace. But without the dedicated persisted directory you will not see your plugin.

I demonstrated it several times on the sprint review.
One from the videos https://www.youtube.com/watch?v=28WqjC-9ciQ

@sunix
Copy link
Contributor

sunix commented Feb 5, 2020

If we are not about to merge that one let's close it and create/update epic on how to properly install vscode extensions on the editor or sidecars container, dynamically (if possible) or with workspace restart and with devfile update. Could you prepare that @vitaliy-guliy ?

@ericwill
Copy link
Contributor

ericwill commented Jun 3, 2020

Going to close this one for now, we can revisit this discussion at a later date.

@ericwill ericwill closed this Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants