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 key value pairs consistency in logging #6150

Merged
merged 1 commit into from
Jul 27, 2022

Conversation

sbueringer
Copy link
Member

@sbueringer sbueringer commented Feb 16, 2022

What this PR does / why we need it:
[WIP] => just experimenting right now.

Notes:

  • now based on latest versions of controller-runtime and klog

Open tasks:

  • go through all controllers make sure we have k/v pairs for objects of the hierarchy (cluster, machine, ...)
  • grep over all calls where we add new k/v pairs to a logger and make sure we do it in the right format and not redundantly
    • WithValues
    • LoggerFrom
    • .Error, .Info, ...
    • ...

Please note all kind's should be upper-case (as the following PR has been merged: kubernetes-sigs/controller-runtime#1954)

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 #

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 16, 2022
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 16, 2022
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 17, 2022
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 17, 2022
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 18, 2022
@sbueringer sbueringer force-pushed the pr-cr-log-keys branch 2 times, most recently from 98ad1e4 to 8386cf0 Compare February 22, 2022 09:41
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 22, 2022
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 22, 2022
@sbueringer sbueringer changed the title [WIP] 🌱 Customize controller loggers [WIP] Logging PoC Feb 22, 2022
@sbueringer sbueringer force-pushed the pr-cr-log-keys branch 2 times, most recently from 2d144d1 to eb936a5 Compare February 22, 2022 12:26
@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 Feb 22, 2022
Tiltfile Outdated Show resolved Hide resolved
@sbueringer sbueringer force-pushed the pr-cr-log-keys branch 2 times, most recently from 50745d3 to 943f665 Compare February 22, 2022 21:12
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 22, 2022
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 27, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 27, 2022
@killianmuldoon killianmuldoon force-pushed the pr-cr-log-keys branch 5 times, most recently from efda671 to d0977af Compare July 27, 2022 15:04
.gitignore Outdated Show resolved Hide resolved
controllers/remote/cluster_cache_tracker.go Outdated Show resolved Hide resolved
exp/internal/controllers/machinepool_controller.go Outdated Show resolved Hide resolved
util/util.go Show resolved Hide resolved
Co-authored-by: Stefan Büringer [email protected]
Signed-off-by: killianmuldoon <[email protected]>
@fabriziopandini
Copy link
Member

/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 Jul 27, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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 Jul 27, 2022
@fabriziopandini
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 27, 2022
@k8s-ci-robot k8s-ci-robot merged commit d761e1b into kubernetes-sigs:main Jul 27, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.3 milestone Jul 27, 2022
@sbueringer
Copy link
Member Author

Looks like we missed this "Please note all kind's should be upper-case (as the following PR has been merged: kubernetes-sigs/controller-runtime#1954)".

I'll open an issue to address it.

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. 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.

6 participants