Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Update pkg/common/flyte_url.go
Browse files Browse the repository at this point in the history
Co-authored-by: Haytham Abuelfutuh <[email protected]>
Signed-off-by: Yee Hing Tong <[email protected]>
  • Loading branch information
wild-endeavor and EngHabu authored May 5, 2023
1 parent 5533ae8 commit 19b7443
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/common/flyte_url.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ func ParseFlyteURL(flyteURL string) (core.NodeExecutionIdentifier, *int, Artifac
executionID := matches["exec"]
nodeID := matches["node"]
var attempt *int // nil means node execution, not a task execution
if matches["attempt"] != "" {
a, err := strconv.Atoi(matches["attempt"])
if attempt := matches["attempt"]; len(attempt) > 0 {
a, err := strconv.Atoi(attempt)
if err != nil {
return core.NodeExecutionIdentifier{}, nil, ArtifactTypeUndefined, fmt.Errorf("failed to parse attempt, %s", err)
return core.NodeExecutionIdentifier{}, nil, ArtifactTypeUndefined, fmt.Errorf("failed to parse attempt [%v], %v", attempt, err)
}
attempt = &a
}
Expand Down

0 comments on commit 19b7443

Please sign in to comment.