dont return not found error in mode 2 (#100758)

* dual writer: dont return not found error in mode 2 when failing to find object in unistore
This commit is contained in:
Will Assis 2025-02-14 15:39:51 -03:00 committed by GitHub
parent cd30f3839d
commit 77fd572973
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View File

@ -137,7 +137,7 @@ func (d *DualWriterMode2) Get(ctx context.Context, name string, options *metav1.
}
}()
return objLegacy, err
return objLegacy, nil
}
// List overrides the behavior of the generic DualWriter.

View File

@ -122,7 +122,6 @@ func TestMode2_Get(t *testing.T) {
m.On("Get", mock.Anything, input, mock.Anything).Return(nil, apierrors.NewNotFound(
schema.GroupResource{Group: "", Resource: "pods"}, "not-found"))
},
wantErr: true,
},
{
name: "should return an error when getting an object from both the LegacyStorage and Storage fails",