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

🐛 fix channel naming validation #231

Merged
merged 4 commits into from
Mar 30, 2022
Merged

🐛 fix channel naming validation #231

merged 4 commits into from
Mar 30, 2022

Conversation

camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Mar 18, 2022

Description

  • Move the warning to check the channel convention to the Good Practices validator which seems like to fit better
  • Load/parse the annotations values from the yaml file to have the channels and default channel defined in the bundle
  • Add new test to ensure the scenarios

Motivation
Fix the issue:
operator-framework/operator-sdk#5586
The warning is not working because we have not the values loaded from the bundle

@openshift-ci openshift-ci bot requested review from exdx and perdasilva March 18, 2022 01:56
pkg/manifests/bundleloader.go Show resolved Hide resolved
pkg/validation/internal/good_practices.go Outdated Show resolved Hide resolved
@camilamacedo86
Copy link
Contributor Author

Hi @exdx,

Thank you for your help in the review.
All done/addressed. please, feel free to check.

@exdx
Copy link
Member

exdx commented Mar 21, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 21, 2022
Copy link
Contributor

@ryantking ryantking left a comment

Choose a reason for hiding this comment

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

Few minor potential changes

pkg/manifests/bundleloader.go Outdated Show resolved Hide resolved
pkg/validation/internal/good_practices.go Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 23, 2022
@camilamacedo86 camilamacedo86 changed the title fix: check for warning when the channel naming does not follow the convention 🐛 fix channel naming validation Mar 25, 2022
Copy link
Contributor

@ryantking ryantking left a comment

Choose a reason for hiding this comment

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

Small change then good to approve

for k, _ := range uniqueValues {
result = append(result, k)
}
return result
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this list is potentially used in a user-facing error message, can you call a sort function to guarantee a deterministic order?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that is a nit that shows outside of the fixed scope.
Can we agree on doing that in a follow-up?

@exdx
Copy link
Member

exdx commented Mar 28, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 28, 2022
@ryantking ryantking removed their assignment Mar 29, 2022
Copy link
Member

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

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

/lgtm

@dinhxuanvu
Copy link
Member

/approve

@openshift-ci
Copy link

openshift-ci bot commented Mar 30, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, dinhxuanvu

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 Mar 30, 2022
@openshift-merge-robot openshift-merge-robot merged commit f718c91 into operator-framework:master Mar 30, 2022
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants