-
Notifications
You must be signed in to change notification settings - Fork 578
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
Pass logger to machine pool scope to get verbosity right, fix copying logger in With...
methods
#4620
Conversation
… logger in `With...` methods
/lgtm |
/retest |
1 similar comment
/retest |
/override pull-cluster-api-provider-aws-apidiff-main |
@richardcase: Overrode contexts on behalf of richardcase: pull-cluster-api-provider-aws-apidiff-main In response to this:
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. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: richardcase 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 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
I found that not all of these logs were printed in production:
That puzzled me a lot, given how both have the same verbosity. It turned out that the parent logger wasn't passed correctly to the
MachinePoolScope
. Also,WithName
and other logger context functions mistakenly changed the object itself when using theLogger
interface, as opposed to go-logr's behavior and interface documentation. With that, the deployed CAPA controller pod logged all desired lines in a reasonable format.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):n/a
Checklist:
Release note: