Skip to content

Commit

Permalink
Removing error handling logic if makeBucket call fails
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Capras <alexcapras@gmail.com>
  • Loading branch information
alexcapras committed Dec 3, 2020
1 parent 588e316 commit 289548e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions workflow/artifacts/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,11 @@ func (s3Driver *S3ArtifactDriver) Save(path string, outputArtifact *wfv1.Artifac

createBucketIfNotPresent := outputArtifact.S3.CreateBucketIfNotPresent
if createBucketIfNotPresent != nil {
log.Infof("Bucket %s does not exist. Trying to create...", outputArtifact.S3.Bucket)
log.Infof("Trying to create bucket: %s", outputArtifact.S3.Bucket)
err = s3cli.MakeBucket(outputArtifact.S3.Bucket, minio.MakeBucketOptions{
Region: outputArtifact.S3.Region,
ObjectLocking: outputArtifact.S3.CreateBucketIfNotPresent.ObjectLocking,
})
if err != nil {
log.Warnf("Failed to create bucket: %v", outputArtifact.S3.Bucket)
return false, nil
}
}

if isDir {
Expand Down

0 comments on commit 289548e

Please sign in to comment.