java icon indicating copy to clipboard operation
java copied to clipboard

EventHandler ResyncPeriod overriding is not respected in DefaultSharedIndexInformer.java

Open haoming-db opened this issue 3 years ago • 2 comments
trafficstars

Describe the bug EventHandler ResyncPeriod overriding is not respected in DefaultSharedIndexInformer.java This line has a bug: https://github.com/kubernetes-client/java/blob/automated-release-15.0.1/util/src/main/java/io/kubernetes/client/informer/impl/DefaultSharedIndexInformer.java#L195 The determineResyncPeriod(resyncCheckPeriodMillis, this.resyncCheckPeriodMillis) is taking 2 identical arguments. It should be determineResyncPeriod(resyncPeriodMillis, this.resyncCheckPeriodMillis).

See the go client implementation: https://github.com/kubernetes/client-go/blob/release-13.0/tools/cache/shared_informer.go#L427

The consequence of this bug: EventHandler's ResyncPeriod overriding is NOT respected.

Please note that fixing this bug might have some risk - some users might set ResyncPeriod to 0 in their EventHandler, and have been relying on this bug to get resync, though by design there should be no resync if ResyncPeriod is set to 0 in EventHandler.

Client Version All

Kubernetes Version All

Java Version N/A

To Reproduce Override ResyncPeriod in EventHandler to be multiples of the default ResyncCheckPeriod of Informer, and you can see your overriding is not taking effects.

Expected behavior See the go client implementation: https://github.com/kubernetes/client-go/blob/release-13.0/tools/cache/shared_informer.go#L427

KubeConfig N/A

Server (please complete the following information): N/A

Additional context N/A

haoming-db avatar Apr 19 '22 18:04 haoming-db

/kind bug

yue9944882 avatar Apr 21 '22 04:04 yue9944882

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:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

k8s-triage-robot avatar Jul 20 '22 04:07 k8s-triage-robot

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:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle rotten

k8s-triage-robot avatar Aug 19 '22 05:08 k8s-triage-robot

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:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

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

/close

k8s-triage-robot avatar Sep 18 '22 05:09 k8s-triage-robot

@k8s-triage-robot: Closing this issue.

In response to this:

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:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

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

/close

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.

k8s-ci-robot avatar Sep 18 '22 05:09 k8s-ci-robot