Skip to content

Commit

Permalink
Merge pull request #980 from jacobweinstock/remove-version-constraint
Browse files Browse the repository at this point in the history
Remove Template version constraint:

## Description

<!--- Please describe what this PR is going to change -->
The requirement for the Template version to be equal to `0.1` has no basis. This was a construct from the Postgres backend days and even then it was an undocumented and unimplemented idea.

## Why is this needed

<!--- Link to issue you have raised -->

Fixes: #

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->


## How are existing users impacted? What migration steps/scripts do we need?

<!--- Fixes a bug, unblocks installation, removes a component of the stack etc -->
<!--- Requires a DB migration script, etc. -->


## Checklist:

I have:

- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
  • Loading branch information
jacobweinstock authored Aug 16, 2024
2 parents fd4b75e + 17b634e commit 8d71432
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
4 changes: 0 additions & 4 deletions internal/deprecated/workflow/template_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
11 changes: 0 additions & 11 deletions internal/deprecated/workflow/template_validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8d71432

Please sign in to comment.