From cbddc41ad5a4dc648514d7f7e7eec734551eb1e2 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Thu, 19 Dec 2024 13:04:09 +0300 Subject: [PATCH] Chore: Avoid logging error for UID mismatch (#98151) --- pkg/storage/unified/apistore/prepare.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/storage/unified/apistore/prepare.go b/pkg/storage/unified/apistore/prepare.go index b6dc7f15a85..8bad6bfbe0a 100644 --- a/pkg/storage/unified/apistore/prepare.go +++ b/pkg/storage/unified/apistore/prepare.go @@ -100,9 +100,11 @@ func (s *Storage) prepareObjectForUpdate(ctx context.Context, updateObject runti if previous.GetUID() == "" { klog.Errorf("object is missing UID: %s, %s", obj.GetGroupVersionKind().String(), obj.GetName()) } else if obj.GetUID() != previous.GetUID() { - if obj.GetUID() != "" { - klog.Errorf("object UID mismatch: %s, was:%s, now: %s", obj.GetGroupVersionKind().String(), previous.GetName(), obj.GetUID()) - } + // Eventually this should be a real error or logged + // However the dashboard dual write behavior hits this every time, so we will ignore it + // if obj.GetUID() != "" { + // klog.Errorf("object UID mismatch: %s, was:%s, now: %s", obj.GetGroupVersionKind().String(), previous.GetName(), obj.GetUID()) + // } obj.SetUID(previous.GetUID()) }