mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-23 05:29:24 +08:00
require onExit and enterypoint templates to be DAGs
This commit is contained in:
@@ -275,6 +275,17 @@ func (c *Client) ValidateWorkflowExecution(namespace string, manifest []byte) (e
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check that entrypoint and onExit templates are DAGs
|
||||||
|
for _, t := range wf.Spec.Templates {
|
||||||
|
if t.Name == wf.Spec.Entrypoint && t.DAG == nil {
|
||||||
|
return errors.New("\"entrypoint\" template should be a DAG")
|
||||||
|
}
|
||||||
|
|
||||||
|
if wf.Spec.OnExit != "" && t.Name == wf.Spec.OnExit && t.DAG == nil {
|
||||||
|
return errors.New("\"onExit\" template should be a DAG")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user