Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Migrate pkg/kubelet/volumemanager to contextual logging #131306

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
Loading
from

Conversation

Chulong-Li
Copy link
Contributor

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Migrate pkg/kubelet/volumemanager to contextual logging

Which issue(s) this PR fixes:

Relates to #130069

Does this PR introduce a user-facing change?

Migrate pkg/kubelet/volumemanager to contextual logging

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Apr 15, 2025
@k8s-ci-robot
Copy link
Contributor

Please note that we're already in Test Freeze for the release-1.33 branch. This means every merged PR will be automatically fast-forwarded via the periodic ci-fast-forward job to the release branch of the upcoming v1.33.0 release.

Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Tue Apr 15 07:34:39 UTC 2025.

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 15, 2025
@Chulong-Li
Copy link
Contributor Author

/wg structured-logging
/area logging
/kind cleanup
/cc @kubernetes/wg-structured-logging-reviews

@k8s-ci-robot k8s-ci-robot added do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 15, 2025
@k8s-ci-robot
Copy link
Contributor

@Chulong-Li: GitHub didn't allow me to request PR reviews from the following users: kubernetes/wg-structured-logging-reviews.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/wg structured-logging
/area logging
/kind cleanup
/cc @kubernetes/wg-structured-logging-reviews

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 15, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @Chulong-Li. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/logging and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 15, 2025
@k8s-ci-robot k8s-ci-robot added area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. labels Apr 15, 2025
@Chulong-Li
Copy link
Contributor Author

/cc @bart0sh

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Chulong-Li
Once this PR has been reviewed and has the lgtm label, please assign thockin for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@bart0sh
Copy link
Contributor

bart0sh commented Apr 15, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 15, 2025
@bart0sh
Copy link
Contributor

bart0sh commented Apr 15, 2025

/assign

@bart0sh
Copy link
Contributor

bart0sh commented Apr 16, 2025

/triage accepted
/priority important-longterm
/retest

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 16, 2025
@bart0sh bart0sh moved this from Triage to Needs Reviewer in SIG Node: code and documentation PRs Apr 16, 2025
@bart0sh
Copy link
Contributor

bart0sh commented Apr 16, 2025

/retest

1 similar comment
@bart0sh
Copy link
Contributor

bart0sh commented Apr 16, 2025

/retest

@bart0sh
Copy link
Contributor

bart0sh commented Apr 20, 2025

@Chulong-Li Thank you for this PR! It looks good to me so far. Probably one thing that I'd suggest to look at - remaining context.TODO and context.Background calls:

$ git grep '\(Background()\)\|\(TODO()\)' ./pkg/kubelet/volumemanager/
pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go:                dswp.kubeClient.CoreV1().PersistentVolumeClaims(namespace).Get(context.TODO(), claimName, metav1.GetOptions{})
pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go:        pv, err := dswp.kubeClient.CoreV1().PersistentVolumes().Get(context.TODO(), name, metav1.GetOptions{})
pkg/kubelet/volumemanager/reconciler/reconstruct.go:    node, fetchErr := rc.kubeClient.CoreV1().Nodes().Get(context.TODO(), string(rc.nodeName), metav1.GetOptions{})
pkg/kubelet/volumemanager/volume_manager_test.go:                       err = manager.WaitForAttachAndMount(context.Background(), pod)
pkg/kubelet/volumemanager/volume_manager_test.go:       err = manager.WaitForAttachAndMount(context.Background(), pod)
pkg/kubelet/volumemanager/volume_manager_test.go:               err = manager.WaitForAttachAndMount(context.Background(), pod)
pkg/kubelet/volumemanager/volume_manager_test.go:               err = manager.WaitForAttachAndMount(context.Background(), pod)
pkg/kubelet/volumemanager/volume_manager_test.go:               kubeClient.CoreV1().PersistentVolumeClaims(namespace).Get(context.TODO(), claimName, metav1.GetOptions{})
pkg/kubelet/volumemanager/volume_manager_test.go:       kubeClient.CoreV1().PersistentVolumeClaims(namespace).Update(context.TODO(), volumeClaim, metav1.UpdateOptions{})
pkg/kubelet/volumemanager/volume_manager_test.go:                       ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
pkg/kubelet/volumemanager/volume_manager_test.go:                       err := manager.WaitForAttachAndMount(context.Background(), pod)

It would be nice to get rid of them or at least of some of them.

@Chulong-Li Chulong-Li force-pushed the volumemanager-contextual-logging branch from 343792e to 6854ea4 Compare April 23, 2025 14:45
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 23, 2025
@Chulong-Li
Copy link
Contributor Author

Hi @bart0sh, thank you for your feedback! I have revised all instances of context.TODO and context.Background in the relevant code sections. Would like to ensure I didn't make it wrong. Could you please take another look?

@Chulong-Li
Copy link
Contributor Author

/retest

@bart0sh
Copy link
Contributor

bart0sh commented Apr 26, 2025

@Chulong-Li

have revised all instances of context.TODO and context.Background in the relevant code sections. Would like to ensure I didn't make it wrong. Could you please take another look?

It looks good. Please, fix CI failure and I'll take another look, thanks!

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 3, 2025
@Chulong-Li Chulong-Li force-pushed the volumemanager-contextual-logging branch from 6854ea4 to 82b0b6c Compare May 11, 2025 02:59
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 11, 2025
@Chulong-Li
Copy link
Contributor Author

/retest

@k8s-ci-robot
Copy link
Contributor

@Chulong-Li: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-linter-hints 82b0b6c link false /test pull-kubernetes-linter-hints
pull-kubernetes-unit-windows-master 82b0b6c link false /test pull-kubernetes-unit-windows-master
pull-kubernetes-verify 82b0b6c link true /test pull-kubernetes-verify

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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubelet area/logging cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/node Categorizes an issue or PR as relevant to SIG Node. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on. wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging.
Projects
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.