You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/02/03 10:52:24 UTC

[GitHub] [incubator-yunikorn-core] wilfred-s commented on a change in pull request #367: [YUNIKORN-1054] Add more queue metrics to Yunikorn

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: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org