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

Launch runInTerminal request in a sidecar container #12845

Closed
tolusha opened this issue Mar 7, 2019 · 2 comments
Closed

Launch runInTerminal request in a sidecar container #12845

tolusha opened this issue Mar 7, 2019 · 2 comments
Assignees
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.

Comments

@tolusha
Copy link
Contributor

tolusha commented Mar 7, 2019

Description

Reproduction Steps

When user starts Python debugger it send a runInTerminal request which run a command in Theia container [1]. In case of running Python plugin in a side car it leads to an error, because python isn't installed in Theia container.

OS and version:

  • Minikube
  • abazko/che-theia:nightly (latest che-theia image without python extension)
  • abazko/che-remote-plugin-python-3.7.2:nightly (image for remote container)
  • Python plugin [2]

Diagnostics:

Is needed for

#12771

[1] /~https://github.com/theia-ide/theia/blob/master/packages/debug/src/browser/debug-session.tsx#L369
[2] https://raw.githubusercontent.com/eclipse/che-plugin-registry/ab/python/plugins/ms-python.python/2019.2.5433/meta.yaml

@tolusha tolusha added kind/task Internal things, technical debt, and to-do tasks to be performed. target/che7 labels Mar 7, 2019
@benoitf benoitf self-assigned this Mar 7, 2019
@benoitf
Copy link
Contributor

benoitf commented Mar 7, 2019

hello,

The "container awareness" of terminal has been added to Plugin API mechanism (all the code run in start()method is adding the sidecar in which it is running.
Here we have the issue because the client is not using "plugin API"

About solving the issue, for now I don't know yet how to do that because, as you can see, the code calling the terminal /~https://github.com/theia-ide/theia/blob/master/packages/debug/src/browser/debug-session.tsx#L369

 const terminal = await this.terminalServer.newTerminal({ title, cwd, shellPath: args[0], shellArgs: args.slice(1), env });

run on the client side and not inside a sidecar.
So I don't know how to tell which container pick-up in that case ?

Is there a way to know on this client for which sidecar it is targeting ?

@benoitf
Copy link
Contributor

benoitf commented Mar 7, 2019

After discussing with Anatolii

When registering debugConfiguration or debugProvider, we should add the CHE_MACHINE_NAME env as an attribute

and when client will initiate the creation of terminal, it will be able to use in Terminal attributes the attribute CHE_MACHINE_NAME (need to find the correct location for that)

then the terminal will be aware on which container to send the request

@tolusha tolusha self-assigned this Mar 7, 2019
@tsmaeder tsmaeder mentioned this issue Mar 12, 2019
5 tasks
@tolusha tolusha closed this as completed Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

No branches or pull requests

2 participants