kubernetes-sigs / cli-utils

This repo contains binaries that built from libraries in cli-runtime.
Apache License 2.0
154 stars 77 forks source link

TechDebt: TaskContext.TaskChannel is never closed #448

Open karlkfi opened 2 years ago

karlkfi commented 2 years ago

taskrunner.NewTaskContext creates a new TaskChannel, but never closes it.

The tests don't seem to care, but it means you can't listen on the TaskChannel until it is closed, including for tr := range taskContext.TaskChannel() {, which makes usage of the TaskChannel need some other mechanism to stop listening.

In general, the function or goroutine that sends or manages sending things to the channel should close it as a signal that no more will be sent. This implies that the TaskRunner should close the TaskChannel, since it manages the tasks that send events to the shared channel.

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

karlkfi commented 2 years ago

Still a problem

/remove-lifecycle rotten

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

karlkfi commented 2 years ago

/remove-lifecycle rotten /lifecycle frozen