Use global function to compare any entity to both stores (#89282)

* WIP implement generic compare interface

* Use global compare fn for all entities

* Lint

* Update pkg/apiserver/rest/dualwriter.go

Co-authored-by: Dan Cech <dcech@grafana.com>

* Don't need to hash, just compare bytes

* Fix tests

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
This commit is contained in:
Leonor Oliveira
2024-06-26 10:19:40 +02:00
committed by GitHub
co-authored by Dan Cech
parent 4651506319
commit 2645958c8c
13 changed files with 52 additions and 66 deletions
-6
View File
@@ -207,9 +207,3 @@ func SelectableScopeNodeFields(obj *scope.ScopeNode) fields.Set {
"spec.parentName": parentName,
})
}
// Compare asserts on the equality of objects returned from both stores (object storage and legacy storage)
func (s *storage) Compare(storageObj, legacyObj runtime.Object) bool {
//TODO: define the comparison logic between a scope returned by the storage and a scope returned by the legacy storage
return false
}