From 1cc5031db5df4259699fe6be1c39d0c0289640d9 Mon Sep 17 00:00:00 2001 From: Ryan Zhang Date: Fri, 13 Jan 2023 15:13:05 +0800 Subject: [PATCH] fix comment --- pkg/controllers/work/patch_util.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/controllers/work/patch_util.go b/pkg/controllers/work/patch_util.go index 7684466fe..cf7ad3c54 100644 --- a/pkg/controllers/work/patch_util.go +++ b/pkg/controllers/work/patch_util.go @@ -114,11 +114,11 @@ func setModifiedConfigurationAnnotation(obj runtime.Object) error { func getOriginalConfiguration(obj runtime.Object) ([]byte, error) { annots, err := metadataAccessor.Annotations(obj) if err != nil { - klog.Warning("cannot access metadata.annotations", "error", err) - return nil, nil + klog.ErrorS(err, "cannot access metadata.annotations", "gvk", obj.GetObjectKind().GroupVersionKind()) + return nil, err } if annots == nil { - klog.Warning("object does not have lastAppliedConfigAnnotation", "obj", obj) + klog.Warning("object does not have annotation", "obj", obj) return nil, nil } original, ok := annots[lastAppliedConfigAnnotation]