Skip to content

Commit

Permalink
feat: remove size limit of 128kb for workflow templates. Fixes #8789 (#…
Browse files Browse the repository at this point in the history
…8796)

* feat: remove size limit of 128kb for workflow templates

Signed-off-by: Dillen Padhiar <dpadhiar99@gmail.com>

* test: removed unnecessary test case for large workflows

Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
  • Loading branch information
dpadhiar authored May 24, 2022
1 parent 5c91d93 commit bc4a80a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
23 changes: 0 additions & 23 deletions test/e2e/functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,29 +339,6 @@ func (s *FunctionalSuite) TestEventOnWorkflowSuccess() {
)
}

func (s *FunctionalSuite) TestLargeWorkflowFailure() {
var uid types.UID
s.Given().
Workflow("@expectedfailures/large-workflow.yaml").
When().
SubmitWorkflow().
WaitForWorkflow(120*time.Second).
Then().
ExpectWorkflow(func(t *testing.T, metadata *metav1.ObjectMeta, status *wfv1.WorkflowStatus) {
uid = metadata.UID
}).
ExpectAuditEvents(
fixtures.HasInvolvedObject(workflow.WorkflowKind, uid),
2,
func(t *testing.T, e []apiv1.Event) {
assert.Equal(t, "WorkflowRunning", e[0].Reason)

assert.Equal(t, "WorkflowFailed", e[1].Reason)
assert.Contains(t, e[1].Message, "workflow templates are limited to 128KB, this workflow is 128001 bytes")
},
)
}

func (s *FunctionalSuite) TestEventOnPVCFail() {
// Test whether an WorkflowFailed event (with appropriate message) is emitted in case of error in creating the PVC
var uid types.UID
Expand Down
5 changes: 0 additions & 5 deletions workflow/controller/workflowpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,6 @@ func (woc *wfOperationCtx) createWorkflowPod(ctx context.Context, nodeName strin
}

envVarTemplateValue := wfv1.MustMarshallJSON(tmpl)
templateSize := len(envVarTemplateValue)
if templateSize > 128000 {
err = fmt.Errorf("workflow templates are limited to 128KB, this workflow is %d bytes", templateSize)
return nil, err
}

// Add standard environment variables, making pod spec larger
envVars := []apiv1.EnvVar{
Expand Down

0 comments on commit bc4a80a

Please sign in to comment.