grafana / grafana-app-sdk

An SDK for developing apps for grafana using kubernetes-like storage and operators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[OpinionatedWatcher] Patch/Updates on Add are read as Add calls

IfSentient opened this issue · comments

When the AddFunc logic in the OpinionatedWatcher contains a Patch or Update to the resource, the finalizer has not yet been added to the resource, so the OpinionatedWatcher reads the update as a resource that was missed (or failed), and propagates it as an Add event instead.

The finalizer is only added after AddFunc succeeds so that it won't be added if the AddFunc logic fails. We should find a way to make sure the OpinionatedWatcher doesn't miscategorize events like this.