Fix: Send Possibly Stale Object on Broken WatchConn to Keep Meshery in Sync #102
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently, when the informer(reflector component to be specific) performs re-listing because of a broken watch connection, Meshery won't get some delete events because the
obj
will be of typeDeletedFinalStateUnknown
in those cases.This PR ensures that we don't lose a
Delete
event when the watch connection established by the informer breaks for some reason, by sending a possibly stale object rather than not sending anything at all.Notes for Reviewers
This may be the reason for #90 and probably related to #100 although I highly doubt that because it is more likely that it's because of the way the clients are handling the events.
Signed commits