Add exception handler to SharedInformerFactory#1992
Conversation
|
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
DetailsInstructions 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. I understand the commands that are listed here. |
|
Relates to issue #1629 |
|
/check-cla |
|
This looks reasonable to me. Can you add unit tests to ensure we don't regress in the future? Thanks! |
|
@brendandburns Sorry for the confusion. Could you please link this pr to issue #1629. In #1629 (comment) I wanted to give @domainname the chance to confirm that this change will solve his problem. Sure it lacks reasonable default value handling, tests, and a little love ;) Will add it. |
66aa670 to
86f9e10
Compare
86f9e10 to
eb8e28b
Compare
|
|
||
| /* visible for testing */ BiConsumer<Class<ApiType>, Throwable> exceptionHandler; | ||
|
|
||
| public Controller( |
There was a problem hiding this comment.
I am not sure if these constructor chains are a good strategy long term. The best option I currently see is
- add a builder for the class
- use the all params constructor from the builder
- deprecate all constructors with partial param sets
Also I would try to get rid of the many new calls here via factories. This could improve testability and introduce entry points for people who want to influence behaviour. A larger change but could be done in baby steps. What do you think @brendandburns ?
There was a problem hiding this comment.
Can you file this as an issue so we can have a broader discussion? I want to get @yue9944882 to weigh in as well.
There was a problem hiding this comment.
Yay, have created issue #1995 for discussion. Looking forward to if :)
|
@brendandburns Now it is ready for review. Could you take a look into it, please. I have added some comments. But they are more kind of a discussion. Is there a place to discuss issues? |
|
This looks good to me, but would like @yue9944882 to look at the test refactor to make sure we didn't lose any coverage. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cbuschka, yue9944882 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
No description provided.