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/03/08 03:37:14 UTC

[GitHub] [incubator-yunikorn-k8shim] 9501sam commented on a change in pull request #377: [YUNIKORN-1102] shim context getTask error is ignored

9501sam commented on a change in pull request #377:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/377#discussion_r821293919



##########
File path: pkg/cache/context.go
##########
@@ -700,17 +700,24 @@ func (ctx *Context) RemoveTask(appID, taskID string) error {
 	return fmt.Errorf("application %s is not found in the context", appID)
 }
 
-func (ctx *Context) getTask(appID string, taskID string) (*Task, error) {
+func (ctx *Context) getTask(appID string, taskID string) *Task {
 	ctx.lock.RLock()
 	defer ctx.lock.RUnlock()
-	if app, ok := ctx.applications[appID]; ok {
+	if app := ctx.GetApplication(appID); app != nil {

Review comment:
       OK, that is really more clean, thank you




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