Odo should use apply command for preStart(and postStop when its implemented) #4187
Labels
area/devfile-spec
Issues or PRs related to the Devfile specification and how odo handles and interprets it.
There is a semantic difference between an exec and apply command - exec commands are to be executed only when a container is up and running and apply commands are applied when there is no running container.
However, odo only has exec and composite commands in its scope and preStart utilizes an exec command. But according to the schema definition and interpretation this is not right. See issue devfile/api#204 for discussion.
Currently no odo devfiles have a preStart, so it would be good to update the implementation to use apply commands before a devfile starts using it.
For more information on which events use apply/exec, pls read devfile validation doc - https://github.com/devfile/api/blob/master/pkg/validation/validation-rule.md. Also note the condition for composite commands when it comes to events!
cc: @kadel
The text was updated successfully, but these errors were encountered: