-
Notifications
You must be signed in to change notification settings - Fork 152
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
Support creating S3 args from Secret type Credential #305
Conversation
pkg/restic/restic.go
Outdated
@@ -138,7 +140,7 @@ func resticArgs(profile *param.Profile, repository, encryptionKey string) []stri | |||
var cmd []string | |||
switch profile.Location.Type { | |||
case crv1alpha1.LocationTypeS3Compliant: | |||
cmd = resticS3Args(profile, repository) | |||
cmd, _ = resticS3Args(profile, repository) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatives:
- Check error and log it.
- Check error and propagate it to the caller methods (Need to change function signatures in this package).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's propagate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. Is there a test we can piggyback on for this?
pkg/restic/restic.go
Outdated
@@ -138,7 +140,7 @@ func resticArgs(profile *param.Profile, repository, encryptionKey string) []stri | |||
var cmd []string | |||
switch profile.Location.Type { | |||
case crv1alpha1.LocationTypeS3Compliant: | |||
cmd = resticS3Args(profile, repository) | |||
cmd, _ = resticS3Args(profile, repository) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's propagate.
@tdmanv |
This reverts commit d8f7d76.
* Revert "Update getOSSecret to use Secret credentials in AWS (#309)" This reverts commit 2192605. * Revert "Add secret type credential to validation code (#308)" This reverts commit 9178d4c. * Revert "Support creating S3 args from Secret type Credential (#305)" This reverts commit d8f7d76. * Revert "Add secret type for Param.Credentials (#300)" This reverts commit ad3cbce.
Change Overview
Support creating Restic S3 args from Secret type Credentials.
Pull request type
Please check the type of change your PR introduces: