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

Parallel commands in composite command seem to be run sequentially #6681

Closed
rm3l opened this issue Mar 24, 2023 · 2 comments · Fixed by #7075
Closed

Parallel commands in composite command seem to be run sequentially #6681

rm3l opened this issue Mar 24, 2023 · 2 comments · Fixed by #7075
Assignees
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug. lifecycle/active Indicates that an issue or PR is actively being worked on. It will not be closed automatically. priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Milestone

Comments

@rm3l
Copy link
Member

rm3l commented Mar 24, 2023

/kind bug
/area devfile-spec

What versions of software are you using?

Operating System:
Fedora 37, kernel 6.2.7-200.fc37.x86_64

Output of odo version:
odo v3.8.0 (47234b9)

odo v3.8.0 (47234b94b)

Server: https://0.0.0.0:6443
Kubernetes: v1.26.2

How did you run odo exactly?

I ran into this issue when trying to use odo deploy with a parallel composite command (applying several Kubernetes components and running exec commands in parallel).
Here is a much simpler Devfile to reproduce the issue.

odo init \
  --name my-component-with-parallel-commands \
  --devfile-path https://gist.githubusercontent.com/rm3l/5691e926a4cfe37e369d93695187bdd6/raw/95abc768e83bd83e7acda035a6053f57b20f4939/devfile-with-parallel-commands.yaml

odo dev

Actual behavior

From the logs, it looks like the commands are running sequentially. We also have the same issues with apply commands.

 •  Waiting for Kubernetes resources  ...
 ⚠  Pod is Pending
 ✓  Pod is Running
 ✓  Syncing files into the container [70ms]
 ✓  Building your application in container (command: exec-1) [5s]
 ✓  Building your application in container (command: exec-2) [27ms]
 ✓  Building your application in container (command: exec-3) [38ms]
 •  Executing the application (command: run-1)  ...
 ✓  Finished executing the application (command: run-1) [5s]
 •  Executing the application (command: run-2)  ...
 ✓  Finished executing the application (command: run-2) [150ms]
 •  Executing the application (command: run-3)  ...
 ✓  Finished executing the application (command: run-3) [133ms]

Expected behavior

Per the Devfile spec, parallel can be used to run the commands in parallel. So we should make sure to honor that.
I guess it was handled at some point in the past because I saw it being checked in the code. After a very first look, the issue seems to be here: https://github.com/redhat-developer/odo/blob/main/pkg/libdevfile/command.go#L32-L35
This is why I am reporting this as a bug, and not a feature request/user story.

Any logs, error output, etc?

@openshift-ci openshift-ci bot added kind/bug Categorizes issue or PR as related to a bug. area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. labels Mar 24, 2023
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Mar 24, 2023
@kadel kadel added the priority/Medium Nice to have issue. Getting it done before priority changes would be great. label Mar 27, 2023
@github-actions
Copy link
Contributor

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 26, 2023
@rm3l rm3l removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 26, 2023
@rm3l rm3l removed the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Sep 6, 2023
@rm3l rm3l self-assigned this Sep 6, 2023
@rm3l rm3l moved this to In Review 👀 in odo Project Sep 6, 2023
@rm3l
Copy link
Member Author

rm3l commented Sep 6, 2023

/remove-lifecycle stale
/lifecycle active

@openshift-ci openshift-ci bot added the lifecycle/active Indicates that an issue or PR is actively being worked on. It will not be closed automatically. label Sep 6, 2023
@rm3l rm3l added this to the v3.15.0 🚀 milestone Sep 6, 2023
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done ✅ in odo Project Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/bug Categorizes issue or PR as related to a bug. lifecycle/active Indicates that an issue or PR is actively being worked on. It will not be closed automatically. priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants