Skip to content

Commit 11a1550

Browse files
authored
Merge pull request #612 from manfredlift/fix-apply-failed-error
fix: pass error to applyFailed events
2 parents 135cc3f + 051eca7 commit 11a1550

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/apply/task/apply_task.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"k8s.io/klog/v2"
2121
"k8s.io/kubectl/pkg/cmd/apply"
2222
cmddelete "k8s.io/kubectl/pkg/cmd/delete"
23+
2324
applyerror "sigs.k8s.io/cli-utils/pkg/apply/error"
2425
"sigs.k8s.io/cli-utils/pkg/apply/event"
2526
"sigs.k8s.io/cli-utils/pkg/apply/filter"
@@ -121,7 +122,7 @@ func (a *ApplyTask) Start(taskContext *taskrunner.TaskContext) {
121122
// only log event emitted errors if the verbosity > 4
122123
klog.Errorf("apply filter errored (filter: %s, object: %s): %v", applyFilter.Name(), id, fatalErr.Err)
123124
}
124-
taskContext.SendEvent(a.createApplyFailedEvent(id, err))
125+
taskContext.SendEvent(a.createApplyFailedEvent(id, fatalErr))
125126
taskContext.InventoryManager().AddFailedApply(id)
126127
break
127128
}

0 commit comments

Comments
 (0)