wilfred-s commented on a change in pull request #367:
URL:
https://github.com/apache/incubator-yunikorn-core/pull/367#discussion_r798441258
##########
File path: pkg/scheduler/objects/application_state.go
##########
@@ -143,49 +141,53 @@ func NewAppState() *fsm.FSM {
}
},
"leave_state": func(event *fsm.Event) {
- event.Args[0].(*Application).clearStateTimer()
+ event.Args[0].(*Application).clearStateTimer()
//nolint:errcheck
Review comment:
Lets do this consistently:
* Remove all error checks on cast from all callback definitions including
the string cast
* Add the nolint comment to all casts
* Document at the start of the callback declaration the fact that arg 0 must
be an app object and arg 1 a string. Doing something different will cause a run
time panic.
--
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]