Open ecordell opened 1 year ago
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
/remove-lifecycle rotten
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
pkg/kstatus/polling
should probably be deprecated.
pkg/kstatus/watcher
is the preferred way to get status updates now.
If you want to make a PR to fix it, I'll review it, but we're not really investing in the polling any more.
The collector protects
ResourceStatuses
with a mutex for updates, but then passes the whole object to a notify callback:https://github.com/kubernetes-sigs/cli-utils/blob/8609e42fe8677bfc3a8ae13583b4b31540f1f0a3/pkg/kstatus/polling/collector/collector.go#L91-L93
Since the callback runs in a goroutine without any synchronization, the read is racy (and potentially very out of date).
The simplest way to fix it would be to lock around the notify call, but of course then observers can potentially block the poller. I thought I'd open an issue since there should probably be some discussion around the intended use.