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
Migrate podgc controller to contextual logging #114689
Conversation
@pravarag: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pravarag The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
d04ebc9
to
3c0564b
Compare
/retest |
@pravarag: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
I think this does need a release note, as end users could observe this change. |
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.
Thanks for the contribution. Probably you can see the things I pointed out in your IDE or in the failing jobs log: https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/114689/pull-kubernetes-e2e-kind/1607580766642900992
defer utilruntime.HandleCrash() | ||
|
||
klog.Infof("Starting GC controller") | ||
logger.Info("Starting GC controller") |
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.
logger.Info("Starting GC controller") | |
klog.FromContext(ctx).Info("Starting GC controller") |
no need for an extra variable
@@ -112,19 +114,19 @@ func (gcc *PodGCController) Run(ctx context.Context) { | |||
<-ctx.Done() | |||
} | |||
|
|||
func (gcc *PodGCController) gc(ctx context.Context) { | |||
func (gcc *PodGCController) gc(logger klog.Logger, ctx context.Context) { |
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.
I believe logger can be retrived from context logger := klog.FromContext(ctx)
not sure why you've taken logger
as input, similar for other funcs
/wg structured-logging @pravarag: ping - do you intend to finish this PR? |
Hey sorry, been caught up in few other tasks I missed this one. I'll work on finishing it soon 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.
Please also remove the exception from
Line 51 in 5f23f83
-contextual k8s.io/kubernetes/pkg/controller/podgc/.* |
/sig instrumentation Are you still working on this? |
Hi, I've been working on fixing this since the past week. Will push the changes soon |
@pravarag: myself and the approver for these kind of PRs are only available two more days. If you can't finish the PR now, please say so and let someone else finish it. |
Hi @pohly, apologies for delaying work on this PR. As I'm stuck in some other work, happy for anyone else to finish this. Kindly assign someone else who might be interested. |
/close Replaced by #119250 |
@pohly: Closed this PR. 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. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
With this code change, we are migrating podgc controller to contextual logging
Which issue(s) this PR fixes:
Fixes #
Part of kubernetes/enhancements#3077
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: