Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request kubernetes-sigs#612 from manfredlift/fix-apply-fai…
Browse files Browse the repository at this point in the history
…led-error

fix: pass error to applyFailed events
  • Loading branch information
k8s-ci-robot authored Jan 14, 2023
2 parents 135cc3f + 051eca7 commit 11a1550
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/apply/task/apply_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"k8s.io/klog/v2"
"k8s.io/kubectl/pkg/cmd/apply"
cmddelete "k8s.io/kubectl/pkg/cmd/delete"

applyerror "sigs.k8s.io/cli-utils/pkg/apply/error"
"sigs.k8s.io/cli-utils/pkg/apply/event"
"sigs.k8s.io/cli-utils/pkg/apply/filter"
Expand Down Expand Up @@ -121,7 +122,7 @@ func (a *ApplyTask) Start(taskContext *taskrunner.TaskContext) {
// only log event emitted errors if the verbosity > 4
klog.Errorf("apply filter errored (filter: %s, object: %s): %v", applyFilter.Name(), id, fatalErr.Err)
}
taskContext.SendEvent(a.createApplyFailedEvent(id, err))
taskContext.SendEvent(a.createApplyFailedEvent(id, fatalErr))
taskContext.InventoryManager().AddFailedApply(id)
break
}
Expand Down

0 comments on commit 11a1550

Please sign in to comment.