-
Notifications
You must be signed in to change notification settings - Fork 453
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
Switch controller-manager to logr (1) #5057
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now, in json both log format look very similar (only key ordering is different). This is done to make logs less confusing during the migration period. However, in console/text logs quite differently (not supposed to be used in production).
it is unused in gcm/gardenlet controllers
This is what the controller-runtime controller implementation does as well. So, the result will not change when switching from our custom coding to the upstream implementation later on.
Using gbytes.NewBuffer and gbytes.Say is nicer than mocks
gardener-robot
added
area/dev-productivity
Developer productivity related (how to improve development)
area/logging
Logging related
kind/enhancement
Enhancement, improvement, extension
merge/squash
size/XL
Denotes a PR that changes 500-999 lines, ignoring generated files.
labels
Nov 23, 2021
76 tasks
/assign |
@stoyanr Thank you for your review. |
stoyanr
approved these changes
Dec 3, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanations!
/lgtm
rfranzke
approved these changes
Dec 6, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
rfranzke
added a commit
to rfranzke/gardener
that referenced
this pull request
Mar 8, 2022
This was forgotten in gardener#5057 and prevents logs for packages used in gardenlet which were already migrated from `logrus` to `logr`.
rfranzke
added a commit
to rfranzke/gardener
that referenced
this pull request
Mar 12, 2022
This was forgotten in gardener#5057 and prevents logs for packages used in gardenlet which were already migrated from `logrus` to `logr`.
timebertt
pushed a commit
that referenced
this pull request
Mar 14, 2022
…#5539) * Set runtime logger for gardenlet This was forgotten in #5057 and prevents logs for packages used in gardenlet which were already migrated from `logrus` to `logr`. * `NewClientSet` should return hash right away This is to prevent race conditions such as #5285 * Adapt `GardenClientSetFactory` * Adapt `SeedClientSetFactory` * Adapt `PlantClientSetFactory` * Adapt `ShootClientSetFactory`
rfranzke
added a commit
to rfranzke/gardener
that referenced
this pull request
Mar 14, 2022
This was forgotten in gardener#5057 and prevents logs for packages used in gardenlet which were already migrated from `logrus` to `logr`.
rfranzke
added a commit
to rfranzke/gardener
that referenced
this pull request
Mar 14, 2022
This was forgotten in gardener#5057 and prevents logs for packages used in gardenlet which were already migrated from `logrus` to `logr`.
rfranzke
added a commit
to rfranzke/gardener
that referenced
this pull request
Mar 14, 2022
This was forgotten in gardener#5057 and prevents logs for packages used in gardenlet which were already migrated from `logrus` to `logr`.
rfranzke
added a commit
that referenced
this pull request
Mar 14, 2022
…ind" errors during shoot reconciliation/deletion (#5568) * Set runtime logger for gardenlet This was forgotten in #5057 and prevents logs for packages used in gardenlet which were already migrated from `logrus` to `logr`. * `NewClientSet` should return hash right away This is to prevent race conditions such as #5285 * Adapt `GardenClientSetFactory` * Adapt `SeedClientSetFactory` * Adapt `PlantClientSetFactory` * Adapt `ShootClientSetFactory`
rfranzke
added a commit
that referenced
this pull request
Mar 14, 2022
…ind" errors during shoot reconciliation/deletion (#5569) * Set runtime logger for gardenlet This was forgotten in #5057 and prevents logs for packages used in gardenlet which were already migrated from `logrus` to `logr`. * `NewClientSet` should return hash right away This is to prevent race conditions such as #5285 * Adapt `GardenClientSetFactory` * Adapt `SeedClientSetFactory` * Adapt `PlantClientSetFactory` * Adapt `ShootClientSetFactory`
rfranzke
added a commit
that referenced
this pull request
Mar 15, 2022
…ind" errors during shoot reconciliation/deletion (#5567) * Set runtime logger for gardenlet This was forgotten in #5057 and prevents logs for packages used in gardenlet which were already migrated from `logrus` to `logr`. * `NewClientSet` should return hash right away This is to prevent race conditions such as #5285 * Adapt `GardenClientSetFactory` * Adapt `SeedClientSetFactory` * Adapt `PlantClientSetFactory` * Adapt `ShootClientSetFactory`
krgostev
pushed a commit
to krgostev/gardener
that referenced
this pull request
Apr 21, 2022
* Harmonize logrus and zap logging formats Now, in json both log format look very similar (only key ordering is different). This is done to make logs less confusing during the migration period. However, in console/text logs quite differently (not supposed to be used in production). * Switch NewIDLogger to logr * Switch ClientMaps to logr, stop passing around loggers * Construct zap logr in cmd packages * Log result of automaxprocs with logr * Remove injection logic in CreateWorker it is unused in gcm/gardenlet controllers * Optionally inject logr logger into reconcile ctx This is what the controller-runtime controller implementation does as well. So, the result will not change when switching from our custom coding to the upstream implementation later on. * Drop logr mock Using gbytes.NewBuffer and gbytes.Say is nicer than mocks * Replace several usages of logger.Logger * Use injected logger in scheduler * Switch factory to logr * Switch bastion controller to logr * Switch cloudprofile controller to logr * Switch csr-autoapprove controller to logr * make revendor * Address review feedback
krgostev
pushed a commit
to krgostev/gardener
that referenced
this pull request
Apr 21, 2022
…gardener#5539) * Set runtime logger for gardenlet This was forgotten in gardener#5057 and prevents logs for packages used in gardenlet which were already migrated from `logrus` to `logr`. * `NewClientSet` should return hash right away This is to prevent race conditions such as gardener#5285 * Adapt `GardenClientSetFactory` * Adapt `SeedClientSetFactory` * Adapt `PlantClientSetFactory` * Adapt `ShootClientSetFactory`
krgostev
pushed a commit
to krgostev/gardener
that referenced
this pull request
Jul 5, 2022
* Harmonize logrus and zap logging formats Now, in json both log format look very similar (only key ordering is different). This is done to make logs less confusing during the migration period. However, in console/text logs quite differently (not supposed to be used in production). * Switch NewIDLogger to logr * Switch ClientMaps to logr, stop passing around loggers * Construct zap logr in cmd packages * Log result of automaxprocs with logr * Remove injection logic in CreateWorker it is unused in gcm/gardenlet controllers * Optionally inject logr logger into reconcile ctx This is what the controller-runtime controller implementation does as well. So, the result will not change when switching from our custom coding to the upstream implementation later on. * Drop logr mock Using gbytes.NewBuffer and gbytes.Say is nicer than mocks * Replace several usages of logger.Logger * Use injected logger in scheduler * Switch factory to logr * Switch bastion controller to logr * Switch cloudprofile controller to logr * Switch csr-autoapprove controller to logr * make revendor * Address review feedback
krgostev
pushed a commit
to krgostev/gardener
that referenced
this pull request
Jul 5, 2022
…gardener#5539) * Set runtime logger for gardenlet This was forgotten in gardener#5057 and prevents logs for packages used in gardenlet which were already migrated from `logrus` to `logr`. * `NewClientSet` should return hash right away This is to prevent race conditions such as gardener#5285 * Adapt `GardenClientSetFactory` * Adapt `SeedClientSetFactory` * Adapt `PlantClientSetFactory` * Adapt `ShootClientSetFactory`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/dev-productivity
Developer productivity related (how to improve development)
area/logging
Logging related
kind/enhancement
Enhancement, improvement, extension
size/XL
Denotes a PR that changes 500-999 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
How to categorize this PR?
/area logging dev-productivity
/kind enhancement
What this PR does / why we need it:
This is the first PR of a few, that switches the controllers in gardener-controller-manager from
logrus
tologr
.It tackles:
Which issue(s) this PR fixes:
Part of #4251
Special notes for your reviewer:
/squash
I noticed, that there will be some common questions about different logging aspects. So I plan to add a developer guide answering these questions in one of the following PRs, basically a condensed version of
Release note: