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

Support creating S3 args from Secret type Credential #305

Merged
merged 4 commits into from
Sep 20, 2019

Conversation

hakanmemisoglu
Copy link
Contributor

Change Overview

Support creating Restic S3 args from Secret type Credentials.

Pull request type

Please check the type of change your PR introduces:

  • Work in Progress
  • Refactoring (no functional changes, no api changes)
  • Trivial/Minor
  • Bugfix
  • Feature
  • Documentation

@@ -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)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alternatives:

  1. Check error and log it.
  2. Check error and propagate it to the caller methods (Need to change function signatures in this package).

Copy link
Contributor

Choose a reason for hiding this comment

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

let's propagate.

Copy link
Contributor

@tdmanv tdmanv left a 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?

@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

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

let's propagate.

@hakanmemisoglu hakanmemisoglu changed the title Support creating S3 args Secret type Credential Support creating S3 args from Secret type Credential Sep 20, 2019
@hakanmemisoglu
Copy link
Contributor Author

@tdmanv
Updated the test with 2 cases.
Changed the functions in other packages accordingly.

@mergify mergify bot merged commit d8f7d76 into master Sep 20, 2019
@tdmanv tdmanv deleted the s3-args-from-secret branch September 20, 2019 00:46
hakanmemisoglu pushed a commit that referenced this pull request Sep 20, 2019
mergify bot pushed a commit that referenced this pull request Sep 20, 2019
* 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.
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.

None yet

2 participants