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/05 08:20:37 UTC

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

9501sam commented on pull request #377:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/377#issuecomment-1059719689


   I think the conversion of ```managedTask``` would be always success.
   Should I remove the conversion check ?
   like:
   ```go
   func (ctx *Context) getTask(appID string, taskID string) (*Task, error) {
   	ctx.lock.RLock()
   	defer ctx.lock.RUnlock()
   	if app := ctx.GetApplication(appID); app != nil {
   		if managedTask, err := app.GetTask(taskID); err == nil {
   			return task, nil
   		}
   		return nil, fmt.Errorf("task %s is not found in application %s", taskID, appID)
   	}
   	return nil, fmt.Errorf("application %s is not found in context", appID)
   }
   ```


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