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 Panic in PackageManifest Server #590

Merged
merged 1 commit into from
Dec 4, 2018

Conversation

alecmerdler
Copy link
Member

Description

Seems to have been caused by variable shadowing.

Fixes https://jira.coreos.com/browse/ALM-823

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: alecmerdler

If they are not already assigned, you can assign the PR to them by writing /assign @alecmerdler in a comment when ready.

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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 29, 2018
Copy link
Member

@ecordell ecordell left a comment

Choose a reason for hiding this comment

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

looks good but the tests aren't passing

@alecmerdler alecmerdler force-pushed the ALM-823 branch 4 times, most recently from a33648c to c358d98 Compare December 3, 2018 16:59
@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 Dec 3, 2018
@alecmerdler alecmerdler force-pushed the ALM-823 branch 3 times, most recently from 83189c2 to 73b6b9a Compare December 4, 2018 18:48
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 4, 2018
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 4, 2018

go func() {
<-stopCh
m.mu.Lock()
defer m.mu.Unlock()
for _, add := range m.add {
m.add = append(m.add[:addIndex], m.add[:addIndex+1]...)
Copy link
Member Author

Choose a reason for hiding this comment

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

This was the actual bug, we weren't removing channels from the slice correctly.

m.modify = append(m.modify, modifyEvent)
m.delete = append(m.delete, deleteEvent)

removeChan := func(target chan packagev1alpha1.PackageManifest, all []eventChan) []eventChan {
Copy link
Member

Choose a reason for hiding this comment

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

Nice! Couldn't this be defined as an unexported function since you don't need to close over the lexical scope here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Meh, not used anywhere else. Prefer to keep things in the tightest scope possible (makes it nice to collapse in my editor).

@njhale
Copy link
Member

njhale commented Dec 4, 2018

/approve
/lgtm

@alecmerdler alecmerdler merged commit 2211644 into operator-framework:master Dec 4, 2018
@alecmerdler alecmerdler deleted the ALM-823 branch December 4, 2018 20:27
@openshift-ci-robot
Copy link
Collaborator

@alecmerdler: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-aws 49d87ef link /test e2e-aws
ci/prow/e2e-aws-olm 49d87ef link /test e2e-aws-olm

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

ecordell pushed a commit to ecordell/operator-lifecycle-manager that referenced this pull request Mar 8, 2019
@njhale njhale added the kind/bug Categorizes issue or PR as related to a bug. label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. 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.

4 participants