Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support automatically create OSS bucket if not exists #5133

Merged
merged 2 commits into from
Feb 19, 2021
Merged

feat: Support automatically create OSS bucket if not exists #5133

merged 2 commits into from
Feb 19, 2021

Conversation

terrytangyuan
Copy link
Member

Signed-off-by: terrytangyuan [email protected]

Checklist:

Comment on lines 65 to 76
exists, err := osscli.IsBucketExist(bucketName)
if err != nil {
return false, fmt.Errorf("failed to check if bucket %s exists: %w", bucketName, err)
}
if !exists && outputArtifact.OSS.CreateBucketIfNotPresent {
err = osscli.CreateBucket(bucketName)
if err != nil {
log.Warnf("failed to automatically create bucket %s when it's not present: %v", bucketName, err)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this refactored to only execute IsBucketExists if CreateBucketIfNotPresent is true?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Updated.

@alexec
Copy link
Contributor

alexec commented Feb 19, 2021

LGTM

@alexec alexec merged commit 4611a16 into argoproj:master Feb 19, 2021
@alexec alexec added this to the v3.0 milestone Feb 19, 2021
@terrytangyuan terrytangyuan deleted the auto-bucket branch February 19, 2021 19:50
@simster7 simster7 mentioned this pull request Feb 23, 2021
34 tasks
@simster7 simster7 mentioned this pull request Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants