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 1749643: don't crash on non-hyphenated csc #249

Conversation

gallettilance
Copy link
Member

Problem:
non-hyphenated CatalogSourceConfigs cause the marketplace operator pod
to crash during migration because the function that infers the
CatalogSource name from the CatalogSourceConfig assumes the presence of
a hyphen.

Solution:
Check that splitting a string on the hyphen character produces a list of
length greater than 1.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Sep 9, 2019
@openshift-ci-robot
Copy link
Contributor

@gallettilance: This pull request references Bugzilla bug 1749643, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Bug 1749643: don't crash on non-hyphenated csc

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 9, 2019
if len(possibleCsName) > 1 {
return fmt.Sprintf("%s-%s", possibleCsName[1], "operators")
}
return return fmt.Sprintf("%s-%s", possibleCsName[0], "operators")
Copy link
Member

Choose a reason for hiding this comment

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

can you explain the return return?

if len(possibleCsName) > 1 {
return fmt.Sprintf("%s-%s", possibleCsName[1], "operators")
}
return return fmt.Sprintf("%s-%s", possibleCsName[0], "operators")
Copy link
Member

Choose a reason for hiding this comment

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

does this work in every case? should we have some more fundamental base case here instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we can open a separate PR to improve the implementation of this function?

@cuppett
Copy link

cuppett commented Sep 9, 2019

/test e2e-aws-operator

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 9, 2019
@gallettilance
Copy link
Member Author

@kevinrizza @awgreene this is ready for another review

@gallettilance gallettilance force-pushed the migration-bug-fix branch 3 times, most recently from 5503b3b to 984ae9b Compare September 9, 2019 19:18
@kevinrizza
Copy link
Member

/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gallettilance, kevinrizza

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 10, 2019
@gallettilance
Copy link
Member Author

/retest

@ecordell
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 10, 2019
@awgreene
Copy link
Member

This looks good to me.

Problem:
non-hyphenated CatalogSourceConfigs cause the marketplace operator pod
to crash during migration because the function that infers the
CatalogSource name from the CatalogSourceConfig assumes the presence of
a hyphen.

Solution:
Check that splitting a string on the hyphen character produces a list of
length greater than 1.
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Sep 10, 2019
@ecordell
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 10, 2019
@gallettilance
Copy link
Member Author

/retest

@gallettilance
Copy link
Member Author

/retest

5 similar comments
@ecordell
Copy link
Member

/retest

@gallettilance
Copy link
Member Author

/retest

@gallettilance
Copy link
Member Author

/retest

@shawn-hurley
Copy link
Member

/retest

@ecordell
Copy link
Member

/retest

@openshift-merge-robot openshift-merge-robot merged commit 77108b1 into operator-framework:master Sep 12, 2019
@openshift-ci-robot
Copy link
Contributor

@gallettilance: All pull requests linked via external trackers have merged. Bugzilla bug 1749643 has been moved to the MODIFIED state.

In response to this:

Bug 1749643: don't crash on non-hyphenated csc

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/test-infra repository.

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. 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

8 participants