-
Notifications
You must be signed in to change notification settings - Fork 207
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
OCM-12828 | fix: Do not print create policy commands more than once op roles #2660
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hunterkepley 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 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2660 +/- ##
==========================================
- Coverage 29.18% 29.18% -0.01%
==========================================
Files 184 184
Lines 25350 25353 +3
==========================================
Hits 7399 7399
- Misses 17356 17359 +3
Partials 595 595 ☔ View full report in Codecov by Sentry. |
@hunterkepley: 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. |
Name: policyName, | ||
AlreadyExists: exists, | ||
if _, ok := policyDetails[aws.IngressOperatorCloudCredentialsRoleType]; !ok { | ||
exists, createPolicyCommand, policyName, err := roles.GetHcpSharedVpcPolicyDetails(r, sharedVpcRoleArn) |
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.
Could this be modified to use a common function since L534 -543 and L546 - 557 are pretty much the same
if details.AlreadyExists { // Skip creation if already exists | ||
continue | ||
if !details.AlreadyExists { | ||
if details.AlreadyExists { // Skip creation if already exists |
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.
This is unecessary
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.
Being checked in the line above
No description provided.