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

It's not possible to run a Task in Che-Code if it's not che type #21466

Closed
azatsarynnyy opened this issue Jun 14, 2022 · 9 comments
Closed

It's not possible to run a Task in Che-Code if it's not che type #21466

azatsarynnyy opened this issue Jun 14, 2022 · 9 comments
Assignees
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/bug Outline of a bug - must adhere to the bug report template. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@azatsarynnyy
Copy link
Member

azatsarynnyy commented Jun 14, 2022

Describe the bug

If tasks.json file contains a task of non-che type (e.g. shell), it can't be launched.

Che version

next (development version)

Steps to reproduce

  1. Start a workspace with the Che-Code editor.
  2. Run any non-che task defined in the tasks.json file.

Test tasks.json can be created with Terminal > Configure Tasks... > Create tasks.json file from template > maven.

Terminal panel is open, but the task is not run.

Expected behavior

A task should be run in a default (usually tools) container.

Runtime

OpenShift

Screenshots

image

Installation method

chectl/next

Environment

Linux

Release Notes Text

Tasks included in a tasks.json file of a type other than che were not loaded in a VS Code running in a Che workspace. This has been fixed in this release and tasks.json with tasks of any type are supported and loaded in a Che workspace.

@azatsarynnyy azatsarynnyy added kind/bug Outline of a bug - must adhere to the bug report template. 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 Jun 14, 2022
@Ratgor
Copy link

Ratgor commented Jun 30, 2022

It seems I have the same issue
with / Eclipse Che VS Code Version: 1.68.0 / IDE: che-incubator/che-code/insiders / Chrome 102.0.5005.115 / Windows 10
I could not run shell tasks from tasks.json
(looks like a terminal process hangs without start executing, showing only the first message "> Executing task ... <")
The same shell commands from embedded IDE terminal works ok.
The default shell task example created from drop-down menus (with echo) also doesn't work.

@azatsarynnyy
Copy link
Member Author

It's because the task is sent to machine-exec component for execution in a target container.
In the case of non-Che tasks (shell, etc.) the target container can't be specified, so machine-exec doesn't know where to execute it. We need to rework it to execute any non-Che task in a single container or probably ask the user interactively to specify the target container.

@apupier
Copy link
Contributor

apupier commented Jun 30, 2022

in my case, i would expect to be executed int he same container than the VS Code extension. (I do not know if it would be a common default expectation but as it is the SV Code extension which is executing the task, it seems quite natural)

@l0rd
Copy link
Contributor

l0rd commented Aug 17, 2022

@azatsarynnyy it looks like there is workaround: the task label should match the container name.

@l0rd
Copy link
Contributor

l0rd commented Aug 17, 2022

in my case, i would expect to be executed int he same container than the VS Code extension. (I do not know if it would be a common default expectation but as it is the SV Code extension which is executing the task, it seems quite natural)

@apupier when using a VS Code based workspace the extensions (and VS Code itself) run in the Devfile first container. Running the extensions in sidecar containers (aka running extensions remotely) is not supported with VS Code.

@l0rd
Copy link
Contributor

l0rd commented Sep 20, 2022

Downstream issue

@l0rd
Copy link
Contributor

l0rd commented Oct 6, 2022

@azatsarynnyy can we close this? Asking to decide if we can include it in the 7.55 release notes

@l0rd l0rd added new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes status/release-notes-review-needed Issues that needs to be reviewed by the doc team for the Release Notes wording labels Oct 6, 2022
@azatsarynnyy
Copy link
Member Author

@l0rd yes, it's done and we can close it.
We restored the VS Code native terminal in Che-Code (che-incubator/che-code#124).
So, all task types supported by vanilla VS Code can now be run in Che-Code.

@max-cx max-cx removed the status/release-notes-review-needed Issues that needs to be reviewed by the doc team for the Release Notes wording label Jan 12, 2023
@devstudio-release
Copy link

sync'd to Red Hat JIRA https://issues.redhat.com/browse/CRW-3855

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/bug Outline of a bug - must adhere to the bug report template. new&noteworthy For new and/or noteworthy issues that deserve a blog post, new docs, or emphasis in release notes severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

6 participants