-
Notifications
You must be signed in to change notification settings - Fork 40.9k
Migrate devicemanager to context logging (2/5) #132583
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
base: master
Are you sure you want to change the base?
Conversation
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-sigs/prow repository. |
Hi @chuangw6. Thanks for your PR. I'm waiting for a kubernetes 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. |
@tallclair do you mind stamping ok-to-test |
/assign @tallclair |
/ok-to-test |
ff42d0e
to
1b2dfda
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: chuangw6 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 |
@@ -79,6 +79,8 @@ func (s *podScope) accumulateProvidersHints(pod *v1.Pod) []map[string][]Topology | |||
|
|||
for _, provider := range s.hintProviders { | |||
// Get the TopologyHints for a Pod from a provider. | |||
// TODO (https://github.com/kubernetes/kubernetes/issues/130069): | |||
// Plumb context to GetTopologyHints when migrating global klog to context logging |
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.
What's global klog?
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 meant to say global logger mentioned in KEP https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/3077-contextual-logging#summary.
@@ -17,7 +17,7 @@ limitations under the License. | |||
package topologymanager | |||
|
|||
import ( | |||
"k8s.io/api/core/v1" | |||
v1 "k8s.io/api/core/v1" |
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.
This is out of scope of this PR, please remove.
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 am unable to remove it. It seems to be added automatically by some formatter/sanity check when saving the file. https://github.com/search?q=repo%3Akubernetes%2Fkubernetes+%22v1+%5C%22k8s.io%2Fapi%2Fcore%2Fv1%5C%22%22&type=code
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 looks like it's added by your editor, please consider removing as unrelated. Another editor can return the current import back.
@chuangw6 Thank you for your PR! Can you try to get rid of remaining
|
@bart0sh Thanks for review. This PR is focused on Also note context.TODO() is explicitly used in topology_hints.go to avoid plumbing through ctx all over the places outside devicemanager because of the use of interface.
|
/test pull-kubernetes-unit-windows-master |
That would complicate review and approval and cause conflicts even in your future PRs for devicemanager. I'd suggest expanding the scope to at least one component. If you think device manager is too big for one PR, that's OK. You can start from it's sub-components, for example from |
I understand the struggle to balance the scope and to keep the manageable size. I'm also concerned about cascading changes to the generic plugin manager (see 1/5 in the series) |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Migrate pkg/kubelet/cm/devicemanager/topology_hints.go to context logging
Which issue(s) this PR is related to:
#130069
Special notes for your reviewer:
Until
pkg/kubelet/cm/topologymanager/scope_pod.go
is fully migrated, context.TODO is used to avoid exploding the PR size for just migrating devicemanager.Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: