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

Bug 1526887 - Handle case when whitelist/blacklist set to "" #609

Merged
merged 3 commits into from
Jan 5, 2018

Conversation

shawn-hurley
Copy link
Contributor

Describe what this PR does and why we need it:
Handles case when the yaml looks like

registry:
...
    white_list:
       - ""
....

Changes proposed in this pull request

  • Test case for the use case
  • If block to ignore regex strings that are zero value or ""

Which issue this PR fixes (This will close that issue when PR gets merged)
Bug 1526887

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 4, 2018
@shawn-hurley shawn-hurley added bug needs-review and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 4, 2018
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 607d155 on shawn-hurley:bug-1526887 into ** on openshift:master**.

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 4, 2018
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 56be204 on shawn-hurley:bug-1526887 into ** on openshift:master**.

@@ -62,6 +61,10 @@ func compileRegexp(regexStrs []string) ([]*regexp.Regexp, []failedRegexp) {
failedRegexps := []failedRegexp{}

for _, str := range regexStrs {
if str == "" {
log.Debugf("ignoring empty string that was set as regex string")
Copy link
Contributor

Choose a reason for hiding this comment

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

How about: "Ignoring empty whitelist or blacklist regex."

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 416df5c on shawn-hurley:bug-1526887 into ** on openshift:master**.

Copy link
Member

@djzager djzager left a comment

Choose a reason for hiding this comment

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

ACK

@rthallisey rthallisey merged commit e137227 into openshift:master Jan 5, 2018
jianzhangbjz pushed a commit to jianzhangbjz/ansible-service-broker that referenced this pull request May 17, 2018
…ft#609)

* Bug 1526887 - Handle whitelist set to ""

* removing bad log, because we are updating this file.

* addressing PR comments around log wording.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants