Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

avoid interacting with nil mutatedWfs #477

Merged
merged 3 commits into from
Aug 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/controller/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (p *Propeller) Handle(ctx context.Context, namespace, name string) error {
t := p.metrics.RoundTime.Start(ctx)
mutatedWf, err := p.TryMutateWorkflow(ctx, w)

if wfClosureCrdFields != nil {
if wfClosureCrdFields != nil && mutatedWf != nil {
hamersaw marked this conversation as resolved.
Show resolved Hide resolved
// strip data populated from WorkflowClosureReference
w.SubWorkflows, w.Tasks, w.WorkflowSpec = nil, nil, nil
mutatedWf.SubWorkflows, mutatedWf.Tasks, mutatedWf.WorkflowSpec = nil, nil, nil
Expand Down