chore(swf): fix recurring run + v2 compatible (#6297)
This commit is contained in:
parent
579e46b840
commit
a6ab4e4411
|
|
@ -184,6 +184,8 @@ func (s *ScheduledWorkflow) NewWorkflow(
|
|||
|
||||
result.SetCannonicalLabels(s.Name, nextScheduledEpoch, s.nextIndex())
|
||||
result.SetLabels(commonutil.LabelKeyWorkflowRunId, uuid.String())
|
||||
// Pod pipeline/runid label is used by v2 compatible mode.
|
||||
result.SetPodMetadataLabels(commonutil.LabelKeyWorkflowRunId, uuid.String())
|
||||
// Replace {{workflow.uid}} with runId
|
||||
err = result.ReplaceUID(uuid.String())
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -726,6 +726,9 @@ func TestScheduledWorkflow_NewWorkflow(t *testing.T) {
|
|||
BlockOwnerDeletion: commonutil.BooleanPointer(true)}},
|
||||
},
|
||||
Spec: workflowapi.WorkflowSpec{
|
||||
PodMetadata: &workflowapi.Metadata{
|
||||
Labels: map[string]string{"pipeline/runid": "123e4567-e89b-12d3-a456-426655440001"},
|
||||
},
|
||||
ServiceAccountName: "SERVICE_ACCOUNT",
|
||||
Arguments: workflowapi.Arguments{
|
||||
Parameters: []workflowapi.Parameter{
|
||||
|
|
@ -800,6 +803,9 @@ func TestScheduledWorkflow_NewWorkflow_Parameterized(t *testing.T) {
|
|||
BlockOwnerDeletion: commonutil.BooleanPointer(true)}},
|
||||
},
|
||||
Spec: workflowapi.WorkflowSpec{
|
||||
PodMetadata: &workflowapi.Metadata{
|
||||
Labels: map[string]string{"pipeline/runid": "123e4567-e89b-12d3-a456-426655440001"},
|
||||
},
|
||||
ServiceAccountName: "SERVICE_ACCOUNT",
|
||||
Arguments: workflowapi.Arguments{
|
||||
Parameters: []workflowapi.Parameter{
|
||||
|
|
|
|||
Loading…
Reference in New Issue