Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ SetErrorWatchHandler on SharedIndexInformer #2494

Conversation

troy0820
Copy link
Member

@troy0820 troy0820 commented Sep 14, 2023

  • Adds WatchErrorHandler to InformersOpts struct
  • Adds DefaultWatchErrorHandler to Options struct
  • Adds watchErrorHandler type to Informers struct
    • defaults to cache.DefaultWatchErrorHandler if not passed through options
  • SetErrorWatchErrorHandler on sharedIndexInformer that we create when creating a Cache

This would resolve #2395

/hold

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 14, 2023
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 14, 2023
@troy0820 troy0820 changed the title WIP: ✨ SetErrorWatchHandler on SharedIndexInformer #2395 ✨ WIP: SetErrorWatchHandler on SharedIndexInformer #2395 Sep 14, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 14, 2023
@troy0820 troy0820 changed the title ✨ WIP: SetErrorWatchHandler on SharedIndexInformer #2395 WIP:✨ SetErrorWatchHandler on SharedIndexInformer #2395 Sep 14, 2023
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 14, 2023
@troy0820 troy0820 changed the title WIP:✨ SetErrorWatchHandler on SharedIndexInformer #2395 WIP:✨ SetErrorWatchHandler on SharedIndexInformer Sep 15, 2023
Signed-off-by: Troy Connor <troy0820@users.noreply.github.com>
@troy0820 troy0820 force-pushed the troy0820/setErrorWatchHandler-on-informer branch from 92f3e22 to 0c894a4 Compare September 15, 2023 14:18
@troy0820 troy0820 changed the title WIP:✨ SetErrorWatchHandler on SharedIndexInformer ✨ SetErrorWatchHandler on SharedIndexInformer Sep 15, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 15, 2023
@troy0820
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 15, 2023
@troy0820 troy0820 force-pushed the troy0820/setErrorWatchHandler-on-informer branch from cb2be0e to 0e607db Compare September 18, 2023 14:07
pkg/cache/cache.go Outdated Show resolved Hide resolved
@troy0820 troy0820 force-pushed the troy0820/setErrorWatchHandler-on-informer branch from 0e607db to d97d931 Compare September 18, 2023 17:56
pkg/cache/cache.go Outdated Show resolved Hide resolved
Signed-off-by: Troy Connor <troy0820@users.noreply.github.com>
@troy0820 troy0820 force-pushed the troy0820/setErrorWatchHandler-on-informer branch from d97d931 to 897e04c Compare September 19, 2023 13:31
@FillZpp
Copy link
Contributor

FillZpp commented Sep 20, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 20, 2023
Copy link
Member

@alvaroaleman alvaroaleman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this, this was in the back of my mind as something we should do for a long time

@alvaroaleman alvaroaleman added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Sep 24, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, troy0820

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 24, 2023
@k8s-ci-robot k8s-ci-robot merged commit bb09db8 into kubernetes-sigs:main Sep 24, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

should support SetWatchErrorHandler
4 participants