From 17b634edce2f409a35ade2968b617a687e468a6b Mon Sep 17 00:00:00 2001 From: Jacob Weinstock Date: Fri, 16 Aug 2024 17:02:08 -0600 Subject: [PATCH] Remove Template version constraint: The requirement for the Template version to be equal to "0.1" has no basis. This is most likely the constaint of an undocumented/unimplemented idea. Signed-off-by: Jacob Weinstock --- internal/deprecated/workflow/template_validator.go | 4 ---- .../deprecated/workflow/template_validator_test.go | 11 ----------- 2 files changed, 15 deletions(-) diff --git a/internal/deprecated/workflow/template_validator.go b/internal/deprecated/workflow/template_validator.go index f69710bf6..33d8a0454 100644 --- a/internal/deprecated/workflow/template_validator.go +++ b/internal/deprecated/workflow/template_validator.go @@ -70,10 +70,6 @@ func validate(wf *Workflow) error { return errors.Errorf(errInvalidLength, wf.Name) } - if wf.Version != "0.1" { - return errors.Errorf("invalid template version (%s)", wf.Version) - } - if len(wf.Tasks) == 0 { return errors.New("template must have at least one task defined") } diff --git a/internal/deprecated/workflow/template_validator_test.go b/internal/deprecated/workflow/template_validator_test.go index 9f61ea019..6fd88bc90 100644 --- a/internal/deprecated/workflow/template_validator_test.go +++ b/internal/deprecated/workflow/template_validator_test.go @@ -83,11 +83,6 @@ func TestValidateTemplate(t *testing.T) { wf: toWorkflow(withTemplateLongName()), expectedError: true, }, - { - name: "template version is invalid", - wf: toWorkflow(withTemplateInvalidVersion()), - expectedError: true, - }, { name: "template tasks is nil", wf: toWorkflow(withTemplateNilTasks()), @@ -255,12 +250,6 @@ func withTemplateLongName() workflowModifier { } } -func withTemplateInvalidVersion() workflowModifier { - return func(wf *Workflow) { - wf.Version = "0.2" - } -} - func withTemplateNilTasks() workflowModifier { return func(wf *Workflow) { wf.Tasks = nil