mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-02 21:30:46 +09:00
When the cached release is older than the monitor revision, the watch reads the release live so that an event never pairs a stale spec with the monitor's version. A transient error on that read dropped the monitor event. Both streams are plain API watches, so nothing replayed it, and a client kept the old WorkloadsReady state until the next change of either object. Retry the live read a few times before giving the event up. This covers a failure shorter than the retry window; a longer one still drops the event, as a cache miss did before. A release that is gone is not retried: the event is dropped after one read. The live reads run under a context that Stop cancels, so a stopped watch does not wait on the API server. The tests also pin the two paths that were untested: a release the cache has not seen yet is read live and delivered, and a release that is gone everywhere produces no event. Fixes:f13362b0ee("fix(api): make monitor watch versions usable as delete preconditions") Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la> (cherry picked from commit0ccb3fead7) Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>