anuraagnalluri commented on a change in pull request #349:
URL:
https://github.com/apache/incubator-yunikorn-k8shim/pull/349#discussion_r780900292
##########
File path: pkg/cache/application.go
##########
@@ -422,7 +422,7 @@ func (app *Application) scheduleTasks(taskScheduleCondition
func(t *Task) bool)
log.Logger().Warn("init task failed",
zap.Error(err))
}
} else {
- events.GetRecorder().Event(task.GetTaskPod(),
v1.EventTypeWarning, "FailedScheduling", err.Error())
+ events.GetRecorder().Eventf(task.GetTaskPod(),
nil, v1.EventTypeWarning, "FailedScheduling", "FailedScheduling", err.Error())
Review comment:
@craigcondit Minor difference in new API here:
https://pkg.go.dev/k8s.io/[email protected]/tools/events#EventRecorder
Using `nil` in place of `related` (2nd param) currently since we did not
have concept of secondary object in previous Events API. By same logic, we're
duplicating `reason` param to be same as `action` since the latter was also not
present in previous API.
Let me know if there's a better structure I can follow to populate these
args correctly in `Eventf`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]