SophieTech88 commented on code in PR #850:
URL: https://github.com/apache/yunikorn-k8shim/pull/850#discussion_r1625198727
##########
pkg/admission/priority_class_cache.go:
##########
@@ -36,14 +39,18 @@ type PriorityClassCache struct {
}
// NewPriorityClassCache creates a new cache and registers the handler for the
cache with the Informer.
-func NewPriorityClassCache(priorityClasses informersv1.PriorityClassInformer)
*PriorityClassCache {
+func NewPriorityClassCache(priorityClasses informersv1.PriorityClassInformer)
(*PriorityClassCache, error) {
pcc := &PriorityClassCache{
priorityClasses: make(map[string]bool),
}
if priorityClasses != nil {
-
priorityClasses.Informer().AddEventHandler(&priorityClassUpdateHandler{cache:
pcc})
+ _, err :=
priorityClasses.Informer().AddEventHandler(&priorityClassUpdateHandler{cache:
pcc})
+ if err != nil {
+ log.Log(log.AdmissionConf).Error("Error adding event
handler", zap.Error(err))
Review Comment:
Good catch. Many Thanks. Update the code to delete the useless log.
--
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]