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

OCM-12828 | fix: Do not print create policy commands more than once op roles #2660

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hunterkepley
Copy link
Contributor

No description provided.

Copy link
Contributor

openshift-ci bot commented Nov 28, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 28, 2024
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 27 lines in your changes missing coverage. Please review.

Project coverage is 29.18%. Comparing base (ec3766d) to head (6c49ee2).

Files with missing lines Patch % Lines
cmd/create/operatorroles/by_prefix.go 0.00% 27 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

openshift-ci bot commented Nov 28, 2024

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

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

Choose a reason for hiding this comment

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

This is unecessary

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants