Panic on unchecked cast: interface conversion: interface {} is cache.DeletedFinalStateUnknown, not *unstructured.Unstructured
#3238
Labels
bug
Something isn't working
Describe the bug
We have set up an argo eventsource in our kubernetes cluster. Regularly (but unpredictably), the eventsources crashes in a panic. The panic message is a consistent problem, namely that a cast of an interface is done without checking.
Here is an example of a panic stack trace:
Checking the start.go:290 we can see an unchecked cast. An
*unstructured.Unstructured
is expected but in this case acache.DeletedFinalStateUnknown
is provided.To Reproduce
Unfortunately, this is a thing that happens sometimes and we have a difficult time finding out when the specified panic happens.
In general, passing an
*InformerEvent
with an Obj that is not*unstructured.Unstructured
, will fail the unchecked cast.Expected behavior
If the InformerEvent Obj is not an
*unstructured.Unstructured
, it should be ignored in the passFilters function. In general, the eventsource should not crash for any reason, in this case when an unexpected type is encountered.Environment (please complete the following information):
Message from the maintainers:
If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.
The text was updated successfully, but these errors were encountered: