-
Notifications
You must be signed in to change notification settings - Fork 72
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
fix: Remove duplication around plugins' names #1564
base: master
Are you sure you want to change the base?
fix: Remove duplication around plugins' names #1564
Conversation
Signed-off-by: Mateus Oliveira <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mateusoliveira43 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
switch provider { | ||
case AWSProvider, "velero.io/aws": |
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.
I you run grep -Inr '"velero.io/aws"' .
, you will note only place this is used (aside from test files) is here. Should we remove this and only allow aws
?
} | ||
|
||
// check for invalid config key | ||
for key := range vslSpec.Velero.Config { | ||
valid := validAWSKeys[key] | ||
if !valid { | ||
return false, fmt.Errorf("DPA %s.config key %s is not a valid %s config key", veleroVSLYAMLPath, key, AWSProvider) | ||
return false, fmt.Errorf("DPA %s.config key %s is not a valid %s config key", veleroVSLYAMLPath, key, string(oadpv1alpha1.DefaultPluginAWS)) | ||
} | ||
} | ||
//checking the aws plugin, if not present, throw warning message |
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.
comments are outdated, remove them
/retest |
common failure /override ci/prow/4.17-e2e-test-kubevirt-aws |
@kaovilai: Overrode contexts on behalf of kaovilai: ci/prow/4.17-e2e-test-kubevirt-aws In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@mateusoliveira43: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Why the changes were made
Noted that we use one variable to define what plugins' names DPA accepts, and another in validators. I was afraid this could haunt us in the future.
How to test the changes made
I ran commands like
grep -Inr '"aws"' .
andgrep -Inr "'aws'" .
(ignoringtests
folder) to make sure all occurrences were changed.