Skip to content

Conversation

@anndono
Copy link
Contributor

@anndono anndono commented Jan 5, 2026

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Cherry pick of logging migration(#9664 , #9707 , #9773 , #9778 ): This standardizes logging by migrating from a mix of plaintext and structured logging to contextual logging, improving consistency, clarity, and observability across the codebase.

Which issue(s) this PR fixes:

Fixes #
ref: #1575

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Jan 5, 2026
@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 Jan 5, 2026
@github-actions github-actions bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jan 5, 2026
@k8s-ci-robot
Copy link
Contributor

Hi @anndono. Thanks for your PR.

I'm waiting for a github.com 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.

Details

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 size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 5, 2026
@nilo19
Copy link
Contributor

nilo19 commented Jan 6, 2026

/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 Jan 6, 2026
@nilo19 nilo19 requested a review from Copilot January 6, 2026 00:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the codebase from using klog directly to contextual logging through the pkg/log package. This is a cherry-pick of multiple logging migration changes (#9664, #9707, #9773, #9778) to the release-1.34 branch. The migration standardizes logging by replacing a mix of plaintext and structured logging with consistent contextual logging, improving clarity and observability across the codebase.

Key changes:

  • Import statements changed from k8s.io/klog/v2 to sigs.k8s.io/cloud-provider-azure/pkg/log
  • Logger initialization using log.Background().WithName(...) or log.FromContextOrBackground(ctx).WithName(...)
  • Structured logging with key-value pairs instead of formatted strings

Reviewed changes

Copilot reviewed 63 out of 64 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/e2e/utils/kustoIngest.go Migrates logging to contextual logger for Kusto ingestion utilities
tests/e2e/e2e_test.go Updates test logging with contextual logger and proper error handling
pkg/windows/service/service.go Converts Windows service logging to use contextual logger
pkg/util/node/node.go Updates node utility logging with structured key-value pairs
pkg/util/controller/testutil/test_utils.go Migrates fake node handler test utilities to contextual logging
pkg/util/controller/node/controller_utils.go Updates node controller utilities with contextual logger
pkg/provider/subnet/subnet.go Converts subnet repository logging to contextual approach
pkg/provider/storage/*.go Migrates storage account and file service logging to structured format
pkg/provider/securitygroup/azure_securitygroup_repo.go Updates security group repository logging
pkg/provider/azure_zones.go Converts zone management logging to contextual logger
pkg/provider/azure_vmssflex*.go Migrates VMSS Flex logging to structured key-value format
pkg/provider/azure_vmss*.go Updates VMSS logging with contextual logger
pkg/provider/azure_standard.go Converts availability set logging to contextual approach
pkg/provider/azure_utils.go Updates utility function logging with structured format
pkg/provider/azure_routes.go Migrates route management logging to contextual logger
pkg/provider/azure_publicip_repo.go Updates public IP repository logging
pkg/provider/azure_privatelinkservice.go Converts private link service logging to structured format
pkg/provider/azure_lock.go Updates resource locking logging with contextual logger
pkg/provider/azure_local_services.go Migrates local service logging to structured approach
pkg/provider/azure_loadbalancer*.go Updates load balancer logging with contextual logger and key-value pairs
pkg/provider/azure_interface_repo.go Converts network interface logging to contextual format
pkg/provider/azure_instances*.go Migrates instance management logging to structured approach
pkg/provider/azure_instance_metadata.go Updates metadata service logging with contextual logger
pkg/provider/azure_controller*.go Converts controller logging to structured key-value format
pkg/nodeipam/node_ipam_controller.go Updates node IPAM controller logging with proper error handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nilo19
Copy link
Contributor

nilo19 commented Jan 6, 2026

/retest

1 similar comment
@nilo19
Copy link
Contributor

nilo19 commented Jan 7, 2026

/retest

@nilo19
Copy link
Contributor

nilo19 commented Jan 8, 2026

/retest

1 similar comment
@nilo19
Copy link
Contributor

nilo19 commented Jan 8, 2026

/retest

@nilo19
Copy link
Contributor

nilo19 commented Jan 8, 2026

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 8, 2026
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anndono, nilo19

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 8, 2026
@k8s-ci-robot k8s-ci-robot merged commit 2dc74e7 into kubernetes-sigs:release-1.34 Jan 8, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. 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. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants