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

bugfix: error in Do will never return to outer scope #1976

Merged

Conversation

beautytiger
Copy link
Contributor

Description of the change:
func in Do declared a new local err, it will never be return to outer scope.

Motivation for the change:
fix this bug

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Sep 26, 2019
@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 26, 2019
@openshift-ci-robot
Copy link

Hi @beautytiger. Thanks for your PR.

I'm waiting for a operator-framework or openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@camilamacedo86
Copy link
Contributor

Hi @beautytiger,

Thank you for your contribution. 🥇
Besides after a fast look in the code, it shows ok could you please add the error(steps to reproduce) the behaviour that you face and will be solved with this PR? also, note that it brokes the CI and for we are able to move forward it needs to pass in all tests.

@jmrodri
Copy link
Member

jmrodri commented Sep 27, 2019

This looks reasonable, the reporter is correct we're eating errors here.

@jmrodri
Copy link
Member

jmrodri commented Sep 27, 2019

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 27, 2019
internal/olm/manager.go Outdated Show resolved Hide resolved
internal/olm/manager.go Outdated Show resolved Hide resolved
@beautytiger beautytiger force-pushed the dev-190926-error-scope branch 2 times, most recently from eb9ea74 to 4c065b5 Compare September 28, 2019 12:28
@beautytiger
Copy link
Contributor Author

@camilamacedo86
the := will create new local err, see code pieces : https://play.golang.org/p/FSYbT3L5GAY

@camilamacedo86
Copy link
Contributor

camilamacedo86 commented Sep 28, 2019

Hi @beautytiger,

It shows great now. 👍

It is just missing one detail. Could you please add an entry in the CHANGELOG with the fix as it is done for the others. The change is here, you . can check the others entry as an example over what is expected.

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 29, 2019
@beautytiger
Copy link
Contributor Author

@camilamacedo86
Changelog entry added.
@estroz
I rethink the change, and errChan is not necessary, new variable name can solve this issue. Please check.

CHANGELOG.md Outdated Show resolved Hide resolved
@camilamacedo86
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Sep 29, 2019
@camilamacedo86
Copy link
Contributor

/lgtm
/approve

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

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

Great work 🥇
Thank you for your contribution.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 2, 2019
@camilamacedo86
Copy link
Contributor

Hi @jmrodri and @estroz,

Any objection? Could we merge this one?

internal/olm/manager.go Outdated Show resolved Hide resolved
Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

NOTE: Let's wait for the @jmrodri and/or @estroz check it as well and approve/merge this one.

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 13, 2019
@camilamacedo86
Copy link
Contributor

/test e2e-aws-ansible

1 similar comment
@camilamacedo86
Copy link
Contributor

/test e2e-aws-ansible

Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

Just one fix in the CHANGELOG. Otherwise, LGTM.

CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 15, 2019
@camilamacedo86 camilamacedo86 added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 16, 2019
@camilamacedo86 camilamacedo86 merged commit f26859c into operator-framework:master Oct 21, 2019
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants