diff --git a/pkg/workflow_execution.go b/pkg/workflow_execution.go index c49ca78b..f7430062 100644 --- a/pkg/workflow_execution.go +++ b/pkg/workflow_execution.go @@ -407,8 +407,8 @@ func (c *Client) injectAutomatedFields(namespace string, wf *wfv1.Workflow, opts if template.Metadata.Labels == nil { template.Metadata.Labels = make(map[string]string) } - template.Metadata.Labels["onepanelio/entity-type"] = "Workflow" - template.Metadata.Labels["onepanelio/entity-uid"] = opts.GenerateName + template.Metadata.Labels["onepanel.io/entity-type"] = "Workflow" + template.Metadata.Labels["onepanel.io/entity-uid"] = opts.WorkflowTemplateUID } } @@ -893,6 +893,7 @@ func (c *Client) CreateWorkflowExecution(namespace string, workflow *WorkflowExe return nil, err } opts.GenerateName = nameUID + "-" + opts.WorkflowTemplateUID = workflowTemplate.UID opts.Labels[workflowTemplateUIDLabelKey] = workflowTemplate.UID opts.Labels[workflowTemplateVersionLabelKey] = fmt.Sprint(workflowTemplate.Version) diff --git a/pkg/workflow_execution_types.go b/pkg/workflow_execution_types.go index c6b319b5..eaedb48f 100644 --- a/pkg/workflow_execution_types.go +++ b/pkg/workflow_execution_types.go @@ -31,14 +31,15 @@ type WorkflowExecution struct { // WorkflowExecutionOptions are options you have for an executing workflow type WorkflowExecutionOptions struct { - Name string - GenerateName string - Entrypoint string - Parameters []Parameter - ServiceAccount string - Labels map[string]string - ListOptions *ListOptions - PodGCStrategy *PodGCStrategy + Name string + GenerateName string + Entrypoint string + Parameters []Parameter + ServiceAccount string + Labels map[string]string + ListOptions *ListOptions + PodGCStrategy *PodGCStrategy + WorkflowTemplateUID string } // WorkflowExecutionStatistic is a record keeping track of what happened to a workflow execution