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

Implement a VS Code extension for opening the container terminals #21673

Closed
Tracked by #21653 ...
azatsarynnyy opened this issue Aug 30, 2022 · 2 comments
Closed
Tracked by #21653 ...

Implement a VS Code extension for opening the container terminals #21673

azatsarynnyy opened this issue Aug 30, 2022 · 2 comments
Assignees
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@azatsarynnyy
Copy link
Member

azatsarynnyy commented Aug 30, 2022

Is your task related to a problem? Please describe

Currently, in Che-Code, we have implemented support for opening the terminals into the DevWorkspace containers. On top of that functionality, we have implemented support for running the Devfile Commands in the DevWorkspace containers. These features work well.

Later, we discovered that replacing a VS Code's built-in terminal infrastructure with our machine-exec-based one requires a lot of effort maintaining it in order to:

Describe the solution you'd like

We can keep the VS Code's built-in terminal support as it is in the upstream and don't touch it. All the Che-specific functionality can be provided within a dedicated extension(s).
There are a couple of extension APIs in VS Code that should allow us to contribute all the required functionality:

  • Pseudoterminal API allows contributing a custom implementation of the PTY device (it's a machine-exec-based in our case)
  • CustomExecution API allows executing the Devfile Commands (VS Code Tasks) on the custom pseudoterminal

Describe alternatives you've considered

No response

Additional context

See the result of the investigation in #21626 (comment)

@azatsarynnyy azatsarynnyy added kind/task Internal things, technical debt, and to-do tasks to be performed. sprint/next severity/P1 Has a major impact to usage or development of the system. team/editors area/editor/vscode Issues related to the Code OSS editor of Che labels Aug 30, 2022
@azatsarynnyy azatsarynnyy mentioned this issue Aug 30, 2022
82 tasks
@azatsarynnyy azatsarynnyy self-assigned this Aug 31, 2022
@azatsarynnyy azatsarynnyy changed the title Implement the containers terminals support with the VS Code extension APIs Implement a VS Code extension for opening the container terminals Aug 31, 2022
@azatsarynnyy
Copy link
Member Author

azatsarynnyy commented Sep 20, 2022

upd:
Opening the terminals into DevWorkspace containers with the VS Code Pseudoterminal Extension API works well.
I'm reworking the way how we run the Devfile Commands to use the API of the new extension and VS Code CustomExecution Extension API.

@azatsarynnyy
Copy link
Member Author

The new che-terminal VS Code extension is contributed in the PR che-incubator/che-code#122.
Now, a terminal to a DevWorkspace container is opened using the Pseudoterminal VS Code API.

The existing che-commands extension was reworked in the PR che-incubator/che-code#123.
Now, a Devfile Command is run by calling the che-terminal extension's API using the CustomExecution VS Code API.

Both these steps allowed to return back the built-in VS Code terminal (che-incubator/che-code#124) which enables running all types of VS Code Tasks, but not only the Tasks of che type #21466.
Also, these steps remove all the obstacles to proper work of the PowerShell VS Code extension #21626.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

2 participants