Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw committed Oct 2, 2023
1 parent 847f0d9 commit fecb4cd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions flyteplugins/go/tasks/plugins/array/awsbatch/transformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ func FlyteTaskToBatchInput(ctx context.Context, tCtx pluginCore.TaskExecutionCon
"Required value not set, taskTemplate Container")
}

//jobConfig := newJobConfig().
// MergeFromKeyValuePairs(taskTemplate.GetContainer().GetConfig()).
// MergeFromConfigMap(tCtx.TaskExecutionMetadata().GetOverrides().GetConfig())
//if len(jobConfig.DynamicTaskQueue) == 0 {
// return nil, errors.Errorf(errors.BadTaskSpecification, "config[%v] is missing", DynamicTaskQueueKey)
//}
jobConfig := newJobConfig().
MergeFromKeyValuePairs(taskTemplate.GetContainer().GetConfig()).
MergeFromConfigMap(tCtx.TaskExecutionMetadata().GetOverrides().GetConfig())
if len(jobConfig.DynamicTaskQueue) == 0 {
return nil, errors.Errorf(errors.BadTaskSpecification, "config[%v] is missing", DynamicTaskQueueKey)
}

inputReader := array.GetInputReader(tCtx, taskTemplate)
cmd, err := template.Render(
Expand Down Expand Up @@ -107,7 +107,7 @@ func FlyteTaskToBatchInput(ctx context.Context, tCtx pluginCore.TaskExecutionCon
}
}
submitJobInput.SetJobName(tCtx.TaskExecutionMetadata().GetTaskExecutionID().GetGeneratedName()).
SetJobDefinition(jobDefinition).SetJobQueue("tutorial").
SetJobDefinition(jobDefinition).SetJobQueue(jobConfig.DynamicTaskQueue).
SetRetryStrategy(toRetryStrategy(ctx, toBackoffLimit(taskTemplate.Metadata), cfg.MinRetries, cfg.MaxRetries)).
SetContainerOverrides(toContainerOverrides(ctx, append(cmd, args...), &resources, envVars)).
SetTimeout(toTimeout(taskTemplate.Metadata.GetTimeout(), cfg.DefaultTimeOut.Duration))
Expand Down

0 comments on commit fecb4cd

Please sign in to comment.