java
java copied to clipboard
EventHandler ResyncPeriod overriding is not respected in DefaultSharedIndexInformer.java
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
/kind bug
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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
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/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas 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: 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/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou 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.