SophieTech88 commented on PR #850:
URL: https://github.com/apache/yunikorn-k8shim/pull/850#issuecomment-2143271052

   > @SophieTech88 Could you please propagate the error by 
`AddSchedulingEventHandlers`?
   > 
   > 
https://github.com/apache/yunikorn-k8shim/blob/58adfe941d2d8dae5544af8b49e435f304678807/pkg/cache/context.go#L114
   > 
   > By that change We can handle the error in the main function
   Many thanks for your suggestion. It is a good catch. The function 
`AddSchedulingEventHandlers` is also affected by `AddEventHandler`, so when 
`AddEventHandler` returns error, the function `AddSchedulingEventHandlers` 
should pass the error back, too.
   
   But I see `AddSchedulingEventHandlers` is not called in main(). It works 
during the process for func `InitializeState()`. And when I trace back, the 
error propagate track looks like `AddEventHandler()` ->> `func (ctx *Context) 
AddSchedulingEventHandlers() error {}` ->> `func (ctx *Context) 
InitializeState() error {}` ->> `func (ss *KubernetesShim) initSchedulerState() 
error {}` ->> `func (ss *KubernetesShim) Run() error{}`
   
   I just update the code to fix the return error in func 
`AddSchedulingEventHandlers`. Welcome to any suggestions.


-- 
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]

Reply via email to