-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Change the scheduler plugins FactoryAdapter function to use context parameter to pass logger #116884
Change the scheduler plugins FactoryAdapter function to use context parameter to pass logger #116884
Conversation
Skipping CI for Draft Pull Request. |
/test all |
8beca10
to
ef4ac99
Compare
/test all |
/remove-sig node |
481c394
to
c61572d
Compare
Rebased to resolve conflicts. |
c61572d
to
b19e08a
Compare
/retest |
pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go
Outdated
Show resolved
Hide resolved
b19e08a
to
b6f57bb
Compare
/test pull-kubernetes-node-e2e-containerd |
pkg/scheduler/framework/plugins/nodeunschedulable/node_unschedulable_test.go
Outdated
Show resolved
Hide resolved
pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go
Outdated
Show resolved
Hide resolved
…rameter to pass logger - Migrated pkg/scheduler/framework/plugins/nodevolumelimits to use contextual logging - Fix golangci-lint validation failed - Check for plugins creation err
4c8f7f3
to
a7466f4
Compare
/lgtm Thanks! |
LGTM label has been added. Git tree hash: 04b8dcb1b7e657067a9acd906266ffc5414616f8
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, kerthcet, mengjiao-liu 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 |
/hold cancel |
@mengjiao-liu: The following test 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. |
/test pull-kubernetes-unit |
What type of PR is this?
/kind feature
What this PR does / why we need it:
pkg/scheduler/framework/plugins/nodevolumelimits
to use contextual loggingWhich issue(s) this PR fixes:
Part of #91633 (comment)
Special notes for your reviewer:
Follow the suggestion of #116842 (comment), instead of passing the logger using
handle.Logger()
, we pass the context.Doing so changes the parameters passed in to initialize New function, and some other plugins parameter will also need to be modified.
Some plugins need to pass context during initialization, and the changes are as follows:
see ef4ac99#diff-b5d92dd0897babb368df8c1aad9e95c957eca378bd46481d6d8501011f722715 for more details.
see #116884 (comment) for the newest change.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/sig instrumentation
/wg structured-logging
/area logging
/sig scheduling
#116842 (comment)
The plugins(volumebinding #116803 ,examples/stateful #116885) can use context after waiting for this PR merge.