Skip to content

Commit

Permalink
better
Browse files Browse the repository at this point in the history
Signed-off-by: Katrina Rogan <[email protected]>
  • Loading branch information
katrogan committed Jul 22, 2024
1 parent 947331a commit f398c50
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions flyteadmin/pkg/manager/impl/util/single_task_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ import (

const maxNodeIDLength = 63

var defaultRetryStrategy = core.RetryStrategy{
Retries: 3,
}

const systemNamePrefix = ".flytegen.%s"

const noInputNodeID = ""
Expand Down Expand Up @@ -85,13 +81,6 @@ func CreateOrGetWorkflowModel(
Version: workflowIdentifier.Version,
})

var retryStrategy *core.RetryStrategy
if task.GetClosure().GetCompiledTask().GetTemplate().GetMetadata().GetRetries().GetRetries() > 0 {
retryStrategy = task.GetClosure().GetCompiledTask().GetTemplate().GetMetadata().GetRetries()
} else {
retryStrategy = &defaultRetryStrategy
}

if err != nil {
if ferr, ok := err.(errors.FlyteAdminError); !ok || ferr.Code() != codes.NotFound {
return nil, err
Expand All @@ -106,7 +95,7 @@ func CreateOrGetWorkflowModel(
Id: generateNodeNameFromTask(taskIdentifier.Name),
Metadata: &core.NodeMetadata{
Name: generateNodeNameFromTask(taskIdentifier.Name),
Retries: retryStrategy,
Retries: task.GetClosure().GetCompiledTask().GetTemplate().GetMetadata().GetRetries(),
},
Inputs: generateBindings(*task.Closure.CompiledTask.Template.Interface.Inputs, noInputNodeID),
Target: &core.Node_TaskNode{
Expand Down

0 comments on commit f398c50

Please sign in to comment.