Skip to content
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

🌱 Improve logging for vspherevm_controller & vspherevm_ipaddress_reconciler #2484

Merged

Conversation

adityabhatia
Copy link
Contributor

@adityabhatia adityabhatia commented Nov 2, 2023

What this PR does / why we need it:
This improves logging in vspherevm_controller & vspherevm_ipaddress_reconciler by using the logger from passed context and removing ControllerContext types.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes # #2076

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 2, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @adityabhatia. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 2, 2023
@adityabhatia adityabhatia force-pushed the topic/improveLoggingvSphereVM branch 2 times, most recently from 813af43 to 74be963 Compare November 2, 2023 19:51
@zhanggbj
Copy link
Contributor

zhanggbj commented Nov 7, 2023

/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 Nov 7, 2023
Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (d7b0830) 63.67% compared to head (7cd707b) 63.72%.
Report is 16 commits behind head on main.

Files Patch % Lines
controllers/vspherevm_controller.go 75.51% 12 Missing ⚠️
controllers/vspherevm_ipaddress_reconciler.go 60.00% 4 Missing ⚠️
pkg/context/fake/fake_vm_context.go 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2484      +/-   ##
==========================================
+ Coverage   63.67%   63.72%   +0.05%     
==========================================
  Files         123      123              
  Lines        8773     8758      -15     
==========================================
- Hits         5586     5581       -5     
+ Misses       2773     2763      -10     
  Partials      414      414              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

Just a small nit around the naming of the logger.

Thanks for this!

controllers/vspherevm_controller.go Outdated Show resolved Hide resolved
controllers/vspherevm_controller.go Outdated Show resolved Hide resolved
controllers/vspherevm_ipaddress_reconciler.go Outdated Show resolved Hide resolved
@killianmuldoon
Copy link
Contributor

/test pull-cluster-api-provider-vsphere-e2e-full-main

@adityabhatia
Copy link
Contributor Author

adityabhatia commented Nov 8, 2023

Just a small nit around the naming of the logger.

Thanks for this!

Now there are only 5 other occurrences left across 3 files in the repo.

@adityabhatia
Copy link
Contributor Author

/retest

controllers/vspherevm_controller.go Outdated Show resolved Hide resolved
controllers/vspherevm_controller.go Outdated Show resolved Hide resolved
controllers/vspherevm_controller.go Show resolved Hide resolved
controllers/vspherevm_controller.go Show resolved Hide resolved
controllers/vspherevm_controller.go Outdated Show resolved Hide resolved
controllers/vspherevm_controller_test.go Outdated Show resolved Hide resolved
@sbueringer
Copy link
Member

Thank you!!

/lgtm
/approve

merge pending retest after VMC is fixed (I'll hope that is soon :))

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

LGTM label has been added.

Git tree hash: 09616ae32adc53ccdcfc7b516a13bd690bee5445

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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 /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 Nov 16, 2023
@sbueringer
Copy link
Member

/retest

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Nov 17, 2023

@adityabhatia: The following test 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-cluster-api-provider-vsphere-apidiff-main 7cd707b link false /test pull-cluster-api-provider-vsphere-apidiff-main

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.

@k8s-ci-robot k8s-ci-robot merged commit d868d5c into kubernetes-sigs:main Nov 17, 2023
16 of 17 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. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants