-
Notifications
You must be signed in to change notification settings - Fork 53
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
Remove fatal log calls in executable code #265
Conversation
Hi @tchap. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/ok-to-test |
@tchap please excuse our delay as we are preparing to release v0.1.0-rc1. |
e7ac50e
to
3471446
Compare
Is there actually any reason why all "runnables" are not being managed by |
3471446
to
bed112a
Compare
050c6ae
to
78b367f
Compare
Ok, everything is being managed by |
db1aafa
to
03f317a
Compare
03f317a
to
4666c76
Compare
I would really like to get this merged so that I can continue refactoring logging. I've been rebasing this quite a lot 😅 |
I have to say I am not entirely in love with how the manager is created in |
All Fatal log call are removed. Also all runnable components are now managed by controller-runtime, implementing manager.Runnable interface.
4666c76
to
faa2c5e
Compare
Thanks for doing this, very neat! I ran an e2e test on this PR and also checked the metrics. /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahg-g, tchap 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 |
All Fatal log call are removed. Also all runnable components are now managed by controller-runtime, implementing manager.Runnable interface.
This is related to #251
K8s logging guidelines don't allow fatal logging calls. They can be replaced by the documented calls, but just returning errors properly is a cleaner solution. That is what this PR implements.
ErrorS
is being used instead of fatal calls.errgroup.Group
is being used to manage goroutines and terminate on error.Testing
Regarding testing, I don't have infrastructure to run more than unit tests right now, but I build the executable and tested it manually in the console, both for signal received scenario and failing to bind to a port. If there is a better solution to test this, let me know.
Signal
Failing to bind