mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-05 05:36:50 +08:00
move injectAutomatedFields after exit and init handlers
This commit is contained in:
@@ -362,9 +362,6 @@ func (c *Client) updateCronWorkflow(namespace string, name string, workflowTempl
|
||||
if opts.Labels != nil {
|
||||
cwf.ObjectMeta.Labels = *opts.Labels
|
||||
}
|
||||
if err = c.injectAutomatedFields(namespace, wf, opts); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = injectExitHandlerWorkflowExecutionStatistic(wf, namespace, workflowTemplateId)
|
||||
if err != nil {
|
||||
@@ -374,6 +371,9 @@ func (c *Client) updateCronWorkflow(namespace string, name string, workflowTempl
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err = c.injectAutomatedFields(namespace, wf, opts); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cwf.Spec.WorkflowSpec = wf.Spec
|
||||
cwf.Spec.WorkflowMetadata = &wf.ObjectMeta
|
||||
|
Reference in New Issue
Block a user