Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(controller): Maybe bug with nil woc.wfSpec. Fixes #3121 #3160

Merged
merged 3 commits into from Jun 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion workflow/controller/operator.go
Expand Up @@ -119,6 +119,7 @@ func newWorkflowOperationCtx(wf *wfv1.Workflow, wfc *WorkflowController) *wfOper
woc := wfOperationCtx{
wf: wf.DeepCopyObject().(*wfv1.Workflow),
orig: wf,
wfSpec: &wf.Spec,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets make sure this is always set

updated: false,
log: log.WithFields(log.Fields{
"workflow": wf.ObjectMeta.Name,
Expand Down Expand Up @@ -2683,7 +2684,6 @@ func (woc *wfOperationCtx) loadExecutionSpec() (wfv1.TemplateReferenceHolder, wf

executionParameters := woc.wf.Spec.Arguments

woc.wfSpec = &woc.wf.Spec
if woc.wf.Spec.WorkflowTemplateRef == nil {
tmplRef := &wfv1.WorkflowStep{Template: woc.wfSpec.Entrypoint}
return tmplRef, executionParameters, nil
Expand Down