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

TestTaintsUpdated: Drop errChan, it's usefull only during the startup #585

Conversation

ingvagabund
Copy link
Contributor

Otherwise, one can get:

panic: send on closed channel

goroutine 76 [running]:
sigs.k8s.io/descheduler/pkg/descheduler.TestTaintsUpdated.func1(0x2d1b390, 0xc000126010, 0xc0000d8c60, 0xc00038fbd0, 0xc000111320, 0xc000239380)
	/home/travis/gopath/src/github.com/openshift/descheduler/_output/local/go/src/sigs.k8s.io/descheduler/pkg/descheduler/descheduler_test.go:51 +0xbe
created by sigs.k8s.io/descheduler/pkg/descheduler.TestTaintsUpdated
	/home/travis/gopath/src/github.com/openshift/descheduler/_output/local/go/src/sigs.k8s.io/descheduler/pkg/descheduler/descheduler_test.go:49 +0x6db
FAIL	sigs.k8s.io/descheduler/pkg/descheduler	0.845s

Otherwise, one can get:
```
panic: send on closed channel

goroutine 76 [running]:
sigs.k8s.io/descheduler/pkg/descheduler.TestTaintsUpdated.func1(0x2d1b390, 0xc000126010, 0xc0000d8c60, 0xc00038fbd0, 0xc000111320, 0xc000239380)
	/home/travis/gopath/src/github.com/openshift/descheduler/_output/local/go/src/sigs.k8s.io/descheduler/pkg/descheduler/descheduler_test.go:51 +0xbe
created by sigs.k8s.io/descheduler/pkg/descheduler.TestTaintsUpdated
	/home/travis/gopath/src/github.com/openshift/descheduler/_output/local/go/src/sigs.k8s.io/descheduler/pkg/descheduler/descheduler_test.go:49 +0x6db
FAIL	sigs.k8s.io/descheduler/pkg/descheduler	0.845s
```
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 9, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ingvagabund

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 9, 2021
go func() {
err := RunDeschedulerStrategies(ctx, rs, dp, "v1beta1", stopChannel)
errChan <- err
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should remove this pattern entirely (from when it was added in #568)

Rather, I think the panic you're seeing could be fixed by moving the nil check to here from L55, so we're not always sending nil over this channel. wdyt?

@ingvagabund ingvagabund closed this Jun 9, 2021
@ingvagabund ingvagabund deleted the TestTaintsUpdated-drop-errChan branch June 9, 2021 17:03
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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

3 participants