Added composite command support and test coverage#639
Added composite command support and test coverage#639msivasubramaniaan wants to merge 28 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 |
|
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 |
|
Hello @RomanNikitenko As discussed, the PR is ready for composite commands. I've tested with various cases and confirmed that all cases were working. Here is the proof for But still facing the issue with parallel flow of cross component. Due to PTY limitation on Devspaces the output got mixed. |
There was a problem hiding this comment.
As discussed, the PR is ready for composite commands. I've tested with various cases and confirmed that all cases were working. Here is the proof for sequential flow with cross component
sorry, but sequential flow with cross component does not work correctly
- let's say a user need to build a project first and then run it
- let's say the build process takes some time
- all this time a user has no output for the build process
- it shows the output when the first task is completed only
- but then there is another bug: a user has no output for the second task
- again - it shows the output when a user stops the second task
Please see a short video.
- I created a simple task that prints logs every second to simulate a long running task (like build)
- First I run that regular task to show how it works
- then - I run a composite task
composite.long.task.bug.mp4
|
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 |
cccbcd4 to
11b2e69
Compare
|
Pull Request images published ✨ Editor amd64: quay.io/che-incubator-pull-requests/che-code:pr-639-amd64 |
Hello @RomanNikitenko PR-639.mp4 |
Hello @msivasubramaniaan! Let's go through our discussion step by step:
So - I meant |
|
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 |
@RomanNikitenko I have fixed the issue. Now user can able to see the logs. |
There was a problem hiding this comment.
@RomanNikitenko I have fixed the issue. Now user can able to see the logs.
I tested that use case again and can confirm - it's fixed.
Thank you!
Within testing that use case I detected another problem:
- it's not possible to stop a composite task using Ctrl+C or button on a command item
- processes are hanging for long running commands even after using
Killbutton on UI - so - no command item on UI, but the corresponding process continue to work/is hanging
Please see this video:
Stop.command.bug.mp4
|
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 |
Hello @RomanNikitenko |







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