-
Bug
-
Resolution: Done
-
Major
-
3.19.0.GA
-
False
-
-
False
-
Release Notes
-
-
Bug Fix
-
Done
-
-
Description of problem:
Currently, post-start events are executed based on alphabetic order rather than the sequence in which they are listed in the devfile leading to potential confusion, especially when specific execution order is expected based on the listed sequence.
Support for preserving the listed order of execution would improve user experience and prevent unintended outcomes.
Prerequisites (if any, like setup, operators/versions):
Openshift Dev Spaces (any version)
Steps to Reproduce
Define multiple post-start events in a devfile and start a workspace
commands: - id: event-one exec: commandLine: >- sleep 5 && date > event-one-date.txt && sleep 5 component: tools label: "" workingDir: "${HOME}" - id: event-two exec: commandLine: >- sleep 5 && date > event-two-date.txt && sleep 5 component: tools label: "" workingDir: "${HOME}" - id: event-three exec: commandLine: >- sleep 5 && date > event-three-date.txt && sleep 5 component: tools label: "" workingDir: "${HOME}" events: postStart: - event-one - event-two - event-three
Open the terminal of workspace and list the files
Actual results:
The Date shows that the execution happens in alphabetical order:
che (main) $ ls -alrt /home/user/*date.txt \-rw-r--r--. 1 user root 29 Apr 12 13:47 /home/user/event-one-date.txt \-rw-r--r--. 1 user root 29 Apr 12 13:48 /home/user/event-three-date.txt \-rw-r--r--. 1 user root 29 Apr 12 13:48 /home/user/event-two-date.txt che (main) $ for i in /home/user/*date.txt; do echo $i;cat $i;done /home/user/event-one-date.txt Sat Apr 12 13:47:57 UTC 2025 /home/user/event-three-date.txt Sat Apr 12 13:48:07 UTC 2025 /home/user/event-two-date.txt Sat Apr 12 13:48:17 UTC 2025
Expected results:
The execution should happen in sequential order in the way its listed in postStart command:
che (main) $ ls -alrt /home/user/*date.txt \-rw-r--r--. 1 user root 29 Apr 12 13:47 /home/user/event-one-date.txt \-rw-r--r--. 1 user root 29 Apr 12 13:48 /home/user/event-two-date.txt \-rw-r--r--. 1 user root 29 Apr 12 13:48 /home/user/event-three-date.txt che (main) $ for i in /home/user/*date.txt; do echo $i;cat $i;done /home/user/event-one-date.txt Sat Apr 12 13:47:57 UTC 2025 /home/user/event-two-date.txt Sat Apr 12 13:48:07 UTC 2025 /home/user/event-three-date.txt Sat Apr 12 13:48:17 UTC 2025
Reproducibility (Always/Intermittent/Only Once):
Always
Acceptance criteria:
Definition of Done: