Description
Describe the bug
We've noticed a series of strange situations in where multiple multiple API requests from the client might get inconsistent information. For example an Update to an Application object was made, but immediately after, the information that was part of the Update was missing from the object. These errors seem to happen whenever the Kubernetes watch API is involved to retrieve the second piece of information.
After some research, the Argo CD API Server's Application Watch API seems to be susceptible to:
kubernetes/kubernetes#59848
Which can happen when multiple masters are involved (as in our environments).
To solve this, we need to perform as part of the the Argo CD Watch API, a List followed by Watch, and supply the resource version returned by List response to the Watch request. This should eliminate the inconsistent return results that we have been noticing.