-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
✨ feat(logging): make logging work by default (only v3+) #1721
✨ feat(logging): make logging work by default (only v3+) #1721
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.
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. I understand the commands that are listed here. |
Welcome @georgettica! |
Hi @georgettica. 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/test-infra repository. |
Hi @georgettica, Thank you for your contribution. 🥇 some nits:
|
/ok-to-test |
/test pull-kubebuilder-e2e-k8s-1-16-2 |
do you think this could count as an |
currently logging is done by adding these lines, it would be simpler if this was baked into the kubebuilder all previous functionality is retained - chore: run make generate
0639126
to
319472d
Compare
@camilamacedo86 rewrote the description and squashed commits |
as the test doesn't have an issue with my code and only a timeout will retest it |
/test pull-kubebuilder-e2e-k8s-1-17-0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shows ok for me 👍
/approve
@joelanford WDYT?
This comment has been minimized.
This comment has been minimized.
@camilamacedo86 I think there is something off in my local deployment of this.. I seem to not be able to configure the log level from the deployment can you TAL on that whenever you have a cycle? the operator in question: https://github.com/openshift/route-monitor-operator for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @georgettica,
shows that your project has a diff/old version of controller-runtime.
however, your comment makes me think that would be nice to add a check to ensure this change in kubebuilder/test/e2e/v3/. wDYT could you please add it for we are able to move forward with?
This comment has been minimized.
This comment has been minimized.
@camilamacedo86 I want to add this change but it is a bit above my level of understanding for now.. can I merge this and pass the autotests to someone else? |
It shows ok for me @prafull01 @gabbifish @hasbro17 could you please give a hand to review this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified this change locally. It shows OK for me 👍
@prafull01 can you help with guiding me on this?
I know the change is to be made here https://github.com/kubernetes-sigs/kubebuilder/blob/master/test/e2e/v3/e2e_suite.go, but aside of that I wasn't able to figure out how to add my validation |
@georgettica This zap logging changes are recently added to the controller-runtime and is not present in the older versions. Hence, e2e test should have a check which verifies that the log
The output of controller-manager logs after this change:
So, verification of this change that the logs are generated in proper format can be added to e2e tests, just after the following tests in e2e.
@camilamacedo86 Please correct me if there is mistake in my understanding. |
Really thank you @prafull01. It is perfect. Ideally, when we do a change we need to ensure its tests as well. However, since @prafull01 help here and manually checks it in #1721 (comment) and it is very small, if you still strangle to add the tests as he described I think that it is fine we can move forward and to do it a follow-up. But we need to raise an issue at least for that do not get lost. Let's see what others think as well. So, it is for me: /approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The follow up to the tests was tacked in : #1739
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, georgettica 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 |
Thanks @camilamacedo86 ! I will follow up on it there and see if I can help.push it forward |
There's an upstream bug that results in |
Description
This PR makes the
kubebuilder init
initialize the default logging in a way that:debug
Motivation
to reduce friction and allow an operator developer not have to meddle with the main.go if not required, this will be related to trying inside the Reconcile function to call
r.Log.V(2).Info("message")
and trying to enable it on demandRelated issues