Added composite command support and test coverage#639
Added composite command support and test coverage#639msivasubramaniaan wants to merge 40 commits intoche-incubator:mainfrom
Conversation
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
|
|
||
| // Single-component → join commands | ||
| const joiner = parallel ? " & " : " && "; | ||
| let compositeCmd = execs.map((e) => e.commandLine).join(joiner); |
There was a problem hiding this comment.
@RomanNikitenko , is string manipulation the only way to do this ? Using compound tasks on the vscode side still isn't possible ?
There was a problem hiding this comment.
I investigated that area more than 2 years ago, so I asked @msivasubramaniaan to double check that option when he started to work on the issue.
@msivasubramaniaan could you provide result of your investigation?
There was a problem hiding this comment.
I double-checked this again.
At the moment, yes — string manipulation is still the only practical way to achieve this.
VS Code does not support dynamically creating or chaining compound tasks programmatically from an extension. Compound tasks must be statically defined in tasks.json, and there’s no API to generate or invoke a compound task on the fly based on resolved components or runtime data.
Because of that limitation, joining commands using && / & (depending on parallel vs sequential execution) remains the only viable solution when the task needs to be assembled dynamically.
So the approach of building a composite command string is the only way
RomanNikitenko
left a comment
There was a problem hiding this comment.
@msivasubramaniaan
I tried to test the functionality using your samples
I run component-parallel-demo command:
My understanding - it should run signal-frontend in the frontend container and signal-backend in the backend container.
Actual behaviour:
- there is no output for both commands, for both containers
- there is just message "Composite multi-component execution completed" which comes from the
taskProviderhttps://github.com/che-incubator/che-code/pull/639/changes#diff-e505171c2bbd2db1494bbb49e7c7ccaad44644b923a12f6c5ca2ebdedd0fdbcdR389
Moreover, the dependent commands just hanging without any output when I run them separately:
Could you clarify:
- what is expected behaviour there?
- is it possible to detect which component is used for your test commands?
- If commands are in the running state - why composite command reports that
Composite multi-component execution completed?
thanks in advance!
|
@msivasubramaniaan
|
|
@msivasubramaniaan
|
|
@msivasubramaniaan |
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
|
For one composite task there are at least 3 terminals Let's say dependent tasks build different modules:
mixed_output.mov |
|
I think there is inconsistent behavior related to the scanning-task-output.mov |
For a composite task running dependent tasks in parallel, there are indeed multiple terminals:
Why we keep the mixed output in the first terminal:
How it can be used effectively:
Why this approach is useful:
So the first terminal is intended as a high-level monitoring view, while the individual terminals remain available for detailed investigation. |
Sorry - but in the current implementation there is no @msivasubramaniaan my personal opinion - there are already separate terminals for each dependent task with the corresponding output - I would not use mixed output in the third terminal... |
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
1 similar comment
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
1 similar comment
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
22864fd to
73ad7de
Compare
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
@RomanNikitenko Also the inconsistency behavior issue also fixed and removed the unnecessary logs as well |
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
|
|
||
| vscode.tasks.executeTask(childTask); | ||
| }); | ||
| closeEmitter.fire(0); |
There was a problem hiding this comment.
The most critical use case is support for Parallel Composite tasks.
In my view, the current implementation would be the best one:
- it is aligned with the VS Code behavior for compound tasks
- dependent tasks run in their own terminals
- there is no mixed output in a single terminal (as in the previous implementation)
- there are no extra terminals: number of terminals = number of dependent tasks (vs the previous approach, where it was number of dependent tasks + 1 parent terminal)
Unfortunately, the current approach has one significant drawback: if I understand correctly - actually a parent (extra) terminal is still created and then immediately closed. It looks like a bug on UI.
Screen.Recording.2026-02-27.at.11.29.26.mov
|
@msivasubramaniaan
Please see on the video 2 behaviors:
build_and_run_bug.mov |
|
@msivasubramaniaan
Update: it does not matter first command fails or the second one - command item has incorrect status...
VS Code behavior, for example:
|
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
1 similar comment
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |








What does this PR do?
This PR supports to run the composite commands in terminal
What issues does this PR fix?
eclipse-che/che#21859
eclipse-che/che#23726
eclipse-che/che#23709
eclipse-che/che#23725
How to test this PR?
Added workspace which has all commands of devfile. Run those commands from
devfile.yaml.Does this PR contain changes that override default upstream Code-OSS behavior?
git rebasewere added to the .rebase folder