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

Remote Theia Plugins execute commands in Theia container instead of their own sidecar #12292

Closed
garagatyi opened this issue Dec 27, 2018 · 5 comments
Assignees
Labels
kind/enhancement A feature request - must adhere to the feature request template.

Comments

@garagatyi
Copy link

Description

When VS Code extension is running as Theia remote plugin it can execute a command in a terminal. At least Kubernetes extension does it to call kubectl commands.
And it always opens terminal to Theia container whereas in our case kubectl is placed inside of a remote plugin container.
We need to figure out:

  • how to make terminal be opened in a remote container instead of Theia's one
  • how to differentiate cases when we need to execute terminal in a plugin's container and when not.

Reproduction Steps

OS and version:

Diagnostics:

@garagatyi
Copy link
Author

@benoitf @l0rd @AndrienkoAleksandr we will need to come up with the idea how to overcome this issue

@slemeur slemeur mentioned this issue Jan 3, 2019
69 tasks
@l0rd l0rd changed the title Kubernetes VS Code extension doesn't respect kubectl placement in a container separate to Theia Remote Theia Plugins execute commands in Theia container instead of their own sidecar Jan 8, 2019
@tsmaeder
Copy link
Contributor

Which plugin API is used to execute the command?

@garagatyi
Copy link
Author

I'm not familiar with theia APIs but after discussions with @evidolob and @AndrienkoAleksandr I think it is createTerminal API (Don't know whether the name is correct or there is some better identifier of the API)

@benoitf benoitf self-assigned this Jan 11, 2019
@l0rd
Copy link
Contributor

l0rd commented Jan 11, 2019

Today we had a call to discuss this issue and here is a summary of what we have discussed :

  • Theia plugin API that need localhost access should be modified: when the plugin runs in a sidecar all actions need to be executed in that sidecar.
  • We are going to start with the plugin API needed by the k8s VS code extension. That won't fix all VS Code extensions but will help defining a pattern easy to apply to other APIs as well.
  • The solution should consist in the the following 4 steps:
    1. Maintain a remote plugins metadata in Theia that contains the sidecar details for each remote plugin (this is tracked by Theia remote plugins metadata #12392)
    2. Modify the API calls that access localhost to access the remote sidecar container instead when executed called by a remote plugin (this issue)
    3. Support running multiple VS Code extensions in the same sidecar (that's mainly to support jdt.ls extensions and tracked by Support running multiple VS Code extensions in the same sidecar #12395)
    4. Don't share the plugins folder anymore amongst all sidecars (this is mainly a cleanup step)
  • @benoitf will work on the first 2 steps during next sprint, step 3 deserves a dedicated discussion and work should start the sprint after this one.

@benoitf
Copy link
Contributor

benoitf commented Feb 6, 2019

merged there eclipse-che/che-theia#42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

No branches or pull requests

4 participants