kubernetes / sample-controller

Repository for sample controller. Complements sample-apiserver
Apache License 2.0
3.15k stars 1.08k forks source link

Preventing event circulation through workqueue #29

Closed devdattakulkarni closed 5 years ago

devdattakulkarni commented 5 years ago

Looking at how UpdateFunc's are setup, I was wondering why ResourceVersion check is not done when setting up UpdateFunc for Foo?

Also, in the syncHandler, updateFooStatus() is called irrespective of whether an update is warranted or not.

Together these two points lead to a situation where syncHandler keeps getting triggered even after processing of an event (Foo or Deployment) is completed. This seems incorrect to me.

I think we should add ResourceVersion check in the UpdateFunc for fooInformer and also maintain a flag in syncHandler to check whether updateFooStatus() is really needed to be called or not.

What do you think?

Here is a WIP PR that includes these fixes: https://github.com/kubernetes/kubernetes/pull/69749

fejta-bot commented 5 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

devdattakulkarni commented 5 years ago

/remove-lifecycle stale

fejta-bot commented 5 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot commented 5 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

fejta-bot commented 5 years ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close

k8s-ci-robot commented 5 years ago

@fejta-bot: Closing this issue.

In response to [this](https://github.com/kubernetes/sample-controller/issues/29#issuecomment-507007452): >Rotten issues close after 30d of inactivity. >Reopen the issue with `/reopen`. >Mark the issue as fresh with `/remove-lifecycle rotten`. > >Send feedback to sig-testing, kubernetes/test-infra and/or [fejta](https://github.com/fejta). >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.