Skip to content

Comments

Added composite command support and test coverage#639

Open
msivasubramaniaan wants to merge 28 commits intoche-incubator:mainfrom
msivasubramaniaan:feat-add-composite-command-support
Open

Added composite command support and test coverage#639
msivasubramaniaan wants to merge 28 commits intoche-incubator:mainfrom
msivasubramaniaan:feat-add-composite-command-support

Conversation

@msivasubramaniaan
Copy link
Collaborator

@msivasubramaniaan msivasubramaniaan commented Jan 28, 2026

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?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

@github-actions
Copy link

github-actions bot commented Jan 28, 2026

Click here to review and test in web IDE: Contribute

@github-actions
Copy link


// Single-component → join commands
const joiner = parallel ? " & " : " && ";
let compositeCmd = execs.map((e) => e.commandLine).join(joiner);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RomanNikitenko , is string manipulation the only way to do this ? Using compound tasks on the vscode side still isn't possible ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Collaborator

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msivasubramaniaan
I tried to test the functionality using your samples
I run component-parallel-demo command:

Image

My understanding - it should run signal-frontend in the frontend container and signal-backend in the backend container.

Actual behaviour:

Moreover, the dependent commands just hanging without any output when I run them separately:

Image

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!

@RomanNikitenko
Copy link
Collaborator

@msivasubramaniaan
I've prepared own sample and tested parallel and sequential uses cases for 2 components, I can confirm - it does not work, there is a bug - no output for both dependent commands and it's unclear if the commands are executed at all:

Screenshot 2026-02-02 at 23 17 53

@RomanNikitenko
Copy link
Collaborator

@msivasubramaniaan
I've detected one more bug : a command label should be displayed instead of id:

Screenshot 2026-02-02 at 23 29 09 Screenshot 2026-02-02 at 23 34 23

@msivasubramaniaan msivasubramaniaan marked this pull request as draft February 5, 2026 11:44
@RomanNikitenko
Copy link
Collaborator

RomanNikitenko commented Feb 5, 2026

@msivasubramaniaan
I see you've requested a new review, but image for testing is not ready.
Please let me know when you test all use cases we discussed and regressions are fixed.
Thanks!

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

@github-actions
Copy link

@github-actions
Copy link

@github-actions
Copy link

@github-actions
Copy link

@msivasubramaniaan msivasubramaniaan marked this pull request as ready for review February 12, 2026 11:27
@msivasubramaniaan
Copy link
Collaborator Author

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 sequential flow with cross component
image

But still facing the issue with parallel flow of cross component. Due to PTY limitation on Devspaces the output got mixed.
image
if needed we can raise separate issue for track

Copy link
Collaborator

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@github-actions
Copy link

1 similar comment
@github-actions
Copy link

@msivasubramaniaan msivasubramaniaan force-pushed the feat-add-composite-command-support branch from cccbcd4 to 11b2e69 Compare February 17, 2026 07:12
@github-actions
Copy link

@msivasubramaniaan
Copy link
Collaborator Author

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

Hello @RomanNikitenko
I wanted to know that both tasks are using same component or different component? When I checked with same component it is working as expected. Please share the devfile if possible.

PR-639.mp4

@RomanNikitenko
Copy link
Collaborator

RomanNikitenko commented Feb 17, 2026

Hello @RomanNikitenko I wanted to know that both tasks are using same component or different component? When I checked with same component it is working as expected. Please share the devfile if possible.

Hello @msivasubramaniaan!

Let's go through our discussion step by step:

  • you wrote "Here is the proof for sequential flow with cross component" in the Added composite command support and test coverage #639 (comment)
  • you added a screenshot with the Sequential: Check echo ubi8-ubi9 command to confirm - it works for different components
  • I answered with the message "sorry, but sequential flow with cross component does not work correctly"
  • I provided a video to report that the functionality does not work for sequential long-running composite commands with different components

So - I meant different components.
I'm sorry if I misunderstood your initial comment with the screenshot.

@github-actions
Copy link

@github-actions
Copy link

@msivasubramaniaan
Copy link
Collaborator Author

Hello @RomanNikitenko I wanted to know that both tasks are using same component or different component? When I checked with same component it is working as expected. Please share the devfile if possible.

Hello @msivasubramaniaan!

Let's go through our discussion step by step:

  • you wrote "Here is the proof for sequential flow with cross component" in the Added composite command support and test coverage #639 (comment)
  • you added a screenshot with the Sequential: Check echo ubi8-ubi9 command to confirm - it works for different components
  • I answered with the message "sorry, but sequential flow with cross component does not work correctly"
  • I provided a video to report that the functionality does not work for sequential long-running composite commands with different components

So - I meant different components. I'm sorry if I misunderstood your initial comment with the screenshot.

@RomanNikitenko I have fixed the issue. Now user can able to see the logs.
image

Copy link
Collaborator

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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 Kill button 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

@github-actions
Copy link

@github-actions
Copy link

@msivasubramaniaan
Copy link
Collaborator Author

@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 Kill button 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

Hello @RomanNikitenko
I can handle the both case of terminating the process. Please refer the screenshot:
image

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.

3 participants