mirror of https://github.com/grafana/grafana
[unified-storage/apistore] Fix GuranteedUpdate skipping updates when `tryUpdate` is passed (#94557)
`GuranteedUpdate` method of `apistore.Storage` had a bug, where it would errorneously conclude that the object is unchanged, in case a `tryUpdate` function is passed that modifies the existing object itself (as it is the case in many core types in K8s upstream). The modified `existingObj` was compared with `updatedObj`, which would essentially be same and this lead to the update being skipped. This patch fixes this by always passing a copy of the `existingObj`. Signed-off-by: Prem Kumar <prem.saraswat@grafana.com>pull/94590/head
parent
95afb3a112
commit
e2672021bc
Loading…
Reference in new issue