-
Notifications
You must be signed in to change notification settings - Fork 54
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
Running multiple postStart events is not allowed #1011
Comments
The reason schemaVersion: 2.1.0
metadata:
name: demo-project
components:
- name: tools
container:
image: quay.io/devfile/universal-developer-image:ubi8-f5ffca8
- name: database
container:
image: quay.io/devfile/universal-developer-image:ubi8-f5ffca8
commands:
- id: second-command
exec:
component: tools
commandLine: "echo second command"
- id: install
exec:
component: database
commandLine: "/home/user/.sdkman/candidates/jbang/current/bin/jbang trust add -o --fresh --quiet https://github.com/apache/camel/blob/HEAD/dsl/camel-jbang/camel-jbang-main/dist/CamelJBang.java"
events:
postStart:
- install
- second-command I'd love to support multiple poststart events for the same component, but it would be difficult to do -- the underlying mechanism used is Kubernetes lifecycle hooks, which only support a single command per container. To implement such functionality in DWO would require either managing lifecycle hooks ourselves (which DWO is not suited to do) or figuring out a safe way to chain arbitrary commands (which I don't believe is fully possible). |
This has become critical after this issue has been addressed. |
Description
When I try to use multiple post start events, i get an error saying that Error processing devfile: component tools has multiple postStart events attached to it. As per the devfile 2 schema validation, this is a valid syntax, since both, postStart and commands are accepting array of elements.
How To Reproduce
create 2 commands and use both on a post start
when trying to run use the devfile getting this issue when trying to create workspace
Error processing devfile: component tools has multiple postStart events attached to it
Expected behavior
to apply the both/multiple post start events.
Additional context
The text was updated successfully, but these errors were encountered: