Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Commit

Permalink
fix(sidecar): wrong error logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kmhernan committed Oct 29, 2021
1 parent f812134 commit 72e94b5
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions sidecar/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,16 @@ func (fm *S3FileManager) downloadInputFiles(taskS3Input []*TaskS3Input) (err err
s3Key, s3Bucket, err := getS3KeyAndBucket(taskInput.URL, taskInput.Path, fm)

if err != nil {
log.Infof("downloading; bucket - %v; key - %v", s3Bucket, s3Key)
_, err = downloader.Download(f, &s3.GetObjectInput{
Bucket: aws.String(s3Bucket),
Key: aws.String(s3Key),
})
if err != nil {
log.Errorf("failed to download file with url %s and path %s with error %s: ", taskInput.URL, taskInput.Path, err)
}
log.Errorf("failed to get s3 key and bucket from %v; error - %v", taskInput.URL, err)
}

log.Infof("downloading; bucket - %v; key - %v", s3Bucket, s3Key)
_, err = downloader.Download(f, &s3.GetObjectInput{
Bucket: aws.String(s3Bucket),
Key: aws.String(s3Key),
})
if err != nil {
log.Errorf("failed to download file with url %s and path %s with error %s: ", taskInput.URL, taskInput.Path, err)
}
}

Expand Down

0 comments on commit 72e94b5

Please sign in to comment.