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

[WIP] The PowerShell extension-related fixes #102

Closed
wants to merge 21 commits into from
Closed

Conversation

azatsarynnyy
Copy link
Member

@azatsarynnyy azatsarynnyy commented Sep 9, 2022

Signed-off-by: Artem Zatsarynnyi [email protected]

What does this PR do?

  1. Terminals:
  • Returns back the VS Code built-in terminal with all its features enabled (e.g. Shell integration, contributed Terminal Profiles, etc.).
  • Contributes "opening a terminal to any DevWorkspace container" feature exclusively by the VS Code extension API, without the VS Code internals modifications.
  1. Tasks:
  • All the functionality related to running the Devfile Commands plugged into VS Code through the extensions.
    The che-commands extension relies on the che-terminal extension's API for running the Devfile Commands in any container via the machine-exec server.
  • Returns back the possibility of running any non-Che VS Code Tasks, but not Che Tasks (Devfile Commands) only.
  1. Terminal-related changes removed obstacles that prevented the PowerShell VS Code extension from working properly.
    See more details in the comment PowerShell VS Code extension failed to start eclipse-che/che#21626 (comment).

What issues does this PR fix or reference?

How to test this PR?

Test opening the terminals

Use case 1: there're multiple contributed containers
  1. Start a DevWorkspace with the test project https://github.com/azatsarynnyy/java-spring-petclinic/tree/trm-ext-multiple
  2. In the Command Palette, call the command Terminal: Create New Terminal to DevWorkspace Container.
  3. VS Code should ask to choose a container as there're several contributed containers except for the editor's container.
Use case 2: there's one contributed container (except for the editor's container)
  1. Start a DevWorkspace with the test project https://github.com/azatsarynnyy/java-spring-petclinic/tree/trm-ext
  2. In the Command Palette, call the command Terminal: Create New Terminal to DevWorkspace Container.
  3. VS Code should not ask to choose a container as there's a single contributed container (mariadb) except the editor's container.
  4. VS Code should open a terminal to the container mariadb.
Use case 3: there're no contributed containers (except for the editor's container)

In this case, the behavior should be exactly the same as opening a built-in VS Code terminal.

  1. Start a DevWorkspace with the test project https://github.com/azatsarynnyy/java-spring-petclinic/tree/trm-ext-0
  2. In the Command Palette, call the command Terminal: Create New Terminal to DevWorkspace Container.
  3. VS Code should not ask to choose a container as there're no contributed containers except for the editor's container.
  4. VS Code should open a terminal to the editor container tools.
  5. Check that the opened terminal is a full-featured built-in terminal, not the machine-exec terminal. They differ in that the machine-exec terminal doesn't support features like Shell integration.

Test running the tasks

  1. Start a DevWorkspace with the test project https://github.com/azatsarynnyy/java-spring-petclinic/tree/trm-ext
  2. Create test tasks.json with a shell task. E.g.: Terminal > Configure Tasks... > Create tasks.json file from template > maven.
  3. Run the shell task.
  4. The task should be executed as expected. It shouldn't hang as described in It's not possible to run a Task in Che-Code if it's not che type eclipse-che/che#21466

Test PowerShell extension functionality

  1. Start a DevWorkspace with the test project https://github.com/azatsarynnyy/PowerShellEditorServices/tree/trm-ext.
  2. Install the recommended PowerShell extension.
  3. Make sure a new Terminal Profile pwsh is contributed to the Launch Profile... menu.
  4. After activating the extension (e.g. on opening a *.ps1 file), a new terminal PowerShell Extension is launched automatically.
  5. Check the editor autocompletion in the *.ps1 file work as expected.
  6. Check that the PowerShell left-side panel is populated with the commands.
  7. Check that no problems are reported in the extension's logs (View>Output).

Signed-off-by: Artem Zatsarynnyi <[email protected]>
Signed-off-by: Artem Zatsarynnyi <[email protected]>
Signed-off-by: Artem Zatsarynnyi <[email protected]>
Signed-off-by: Artem Zatsarynnyi <[email protected]>
Signed-off-by: Artem Zatsarynnyi <[email protected]>
Signed-off-by: Artem Zatsarynnyi <[email protected]>
Signed-off-by: Artem Zatsarynnyi <[email protected]>
@azatsarynnyy azatsarynnyy changed the title [WIP] Test running the remote terminal sessions through the extension API [WIP] The PowerShell extension-related fixes Sep 30, 2022
@azatsarynnyy
Copy link
Member Author

This PR is superseded by #122, #123, #124

@azatsarynnyy azatsarynnyy deleted the term-ext branch October 5, 2022 17:40
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.

1 participant