-
Notifications
You must be signed in to change notification settings - Fork 463
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 gardenlet
to logr
(4)
#6265
Switch gardenlet
to logr
(4)
#6265
Conversation
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.
two comments for clarification, otherwise lgtm
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
End of commits of gardener#6265
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 from me as well
/hold |
/assign |
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.
Nits, rest looks good
pkg/gardenlet/controller/backupbucket/backup_bucket_controller.go
Outdated
Show resolved
Hide resolved
pkg/gardenlet/controller/backupentry/backup_entry_controller.go
Outdated
Show resolved
Hide resolved
if err := controllerutils.StrategicMergePatchAddFinalizers(ctx, gardenClient.Client(), backupEntry, gardencorev1beta1.GardenerName); err != nil { | ||
backupEntryLogger.Errorf("could not add finalizer to BackupEntry: %+v", err) | ||
return reconcile.Result{}, err |
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.
return reconcile.Result{}, err | |
return reconcile.Result{}, fmt.Errorf("could not add finalizer to BackupEntry: %w", err) |
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.
I think we have not done this in
gardener/pkg/gardenlet/controller/backupbucket/backup_bucket_reconciler.go
Lines 101 to 103 in 4f5d4e9
log.Info("Adding finalizer") | |
if err := controllerutils.StrategicMergePatchAddFinalizers(ctx, gardenClient.Client(), backupBucket, gardencorev1beta1.GardenerName); err != nil { | |
return reconcile.Result{}, err |
Adding finalizer
log message above this call, hence if an error occurs it will be the next message which makes clear that it is because of trying to add the finalizer. However, I see that this is not consistent across the set of controllers. Should we add it anyways?
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.
I see. We can do it as you prefer.
It would be desirable to clean this up for consistency somewhen though. Maybe it's a good idea to do it in a dedicated PR?
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.
Yes, I add it to my notes and do it in the last PR which drops logrus
. Do you want to have these custom error statements as suggested here or remove them everywhere (and rely on Adding
finalzer` log)?
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.
I tend towards expressive error messages. They make it very easy to pinpoint a given error statement.
/hold cancel |
52d1637
to
c601382
Compare
@rfranzke: The following test failed, say
Full PR test history. Your PR dashboard. Command help for this repository. 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. |
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!
/lgtm
/hold for @rfranzke's feedback on #6265 (comment)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: oliver-goetz, plkokanov, timebertt 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 |
/hold cancel |
How to categorize this PR?
/area logging dev-productivity
/kind enhancement
What this PR does / why we need it:
Migrate
gardenlet
'sBackupEntry
controller tologr
. Similar to #6259.Which issue(s) this PR fixes:
Part of #4251
Release note: