diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 0376e7eae849..31382676d903 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -607,6 +607,10 @@ "type": { "description": "Type indicates type of node", "type": "string" + }, + "workflowTemplateName": { + "description": "WorkflowTemplateName is the WorkflowTemplate resource name on which the resolved template of this node is retrieved.", + "type": "string" } } }, @@ -1586,6 +1590,13 @@ "startedAt": { "description": "Time at which this workflow started", "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "storedTemplates": { + "description": "StoredTemplates is a mapping between a template ref and the node's status.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.argoproj.workflow.v1alpha1.Template" + } } } }, diff --git a/pkg/apis/workflow/v1alpha1/openapi_generated.go b/pkg/apis/workflow/v1alpha1/openapi_generated.go index 390cac11d790..3e677797ee2b 100644 --- a/pkg/apis/workflow/v1alpha1/openapi_generated.go +++ b/pkg/apis/workflow/v1alpha1/openapi_generated.go @@ -1050,6 +1050,13 @@ func schema_pkg_apis_workflow_v1alpha1_NodeStatus(ref common.ReferenceCallback) Ref: ref("github.com/argoproj/argo/pkg/apis/workflow/v1alpha1.TemplateRef"), }, }, + "workflowTemplateName": { + SchemaProps: spec.SchemaProps{ + Description: "WorkflowTemplateName is the WorkflowTemplate resource name on which the resolved template of this node is retrieved.", + Type: []string{"string"}, + Format: "", + }, + }, "phase": { SchemaProps: spec.SchemaProps{ Description: "Phase a simple, high-level summary of where the node is in its lifecycle. Can be used as a state machine.", @@ -2867,6 +2874,20 @@ func schema_pkg_apis_workflow_v1alpha1_WorkflowStatus(ref common.ReferenceCallba }, }, }, + "storedTemplates": { + SchemaProps: spec.SchemaProps{ + Description: "StoredTemplates is a mapping between a template ref and the node's status.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/argoproj/argo/pkg/apis/workflow/v1alpha1.Template"), + }, + }, + }, + }, + }, "persistentVolumeClaims": { SchemaProps: spec.SchemaProps{ Description: "PersistentVolumeClaims tracks all PVCs that were created as part of the workflow. The contents of this list are drained at the end of the workflow.", @@ -2890,7 +2911,7 @@ func schema_pkg_apis_workflow_v1alpha1_WorkflowStatus(ref common.ReferenceCallba }, }, Dependencies: []string{ - "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1.NodeStatus", "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1.Outputs", "k8s.io/api/core/v1.Volume", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1.NodeStatus", "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1.Outputs", "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1.Template", "k8s.io/api/core/v1.Volume", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } diff --git a/workflow/controller/operator.go b/workflow/controller/operator.go index e23aa5e69810..a02186d764cf 100644 --- a/workflow/controller/operator.go +++ b/workflow/controller/operator.go @@ -1115,7 +1115,7 @@ func (woc *wfOperationCtx) executeTemplate(nodeName string, orgTmpl wfv1.Templat // Memoized nodes don't have StartedAt. if node.StartedAt.IsZero() { node.StartedAt = metav1.Time{Time: time.Now().UTC()} - woc.wf.Status.Nodes[node.ID] = *node + woc.wf.Status.Nodes[node.ID] = *node woc.updated = true } }