Unistore: use object from legacy in mode2 (#99533)

This commit is contained in:
Stephanie Hingtgen
2025-01-27 08:11:31 -06:00
committed by GitHub
parent c5ff5d89df
commit dde199f684
-2
View File
@@ -143,7 +143,6 @@ func (d *DualWriterMode2) Get(ctx context.Context, name string, options *metav1.
}
// List overrides the behavior of the generic DualWriter.
// It returns Storage entries if possible and falls back to LegacyStorage entries if not.
func (d *DualWriterMode2) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error) {
var method = "list"
log := d.Log.WithValues("resourceVersion", options.ResourceVersion, "method", method)
@@ -189,7 +188,6 @@ func (d *DualWriterMode2) List(ctx context.Context, options *metainternalversion
for _, obj := range storageList {
name := getName(obj)
if i, ok := legacyNames[name]; ok {
legacyList[i] = obj
areEqual := Compare(obj, legacyList[i])
d.recordOutcome(mode2Str, name, areEqual, method)
if !areEqual {