defenseunicorns/pepr

Random reconnet/retries on UDS Deployment likely watch-process error

Closed this issue · 1 comments

Environment

Reconnect/retries in watcher between Pepr and KFC.

image
image

  1. Investigate the reconnecting
  2. Fix the undefined number of attempts

Steps to reproduce

  1. Deploy a Pepr module with watches

Expected result

Reconnecting after undefined attempts

Actual Result

Reconnecting after N attempts N = defined number.

Visual Proof (screenshots, videos, text, etc)

above

Severity/Priority

HIGH 🔥

Additional Context

Add any other context or screenshots about the technical debt here.

image

The background on this PR is that we are not actually emitting an error, only the retry count.

KFC

  this.#events.emit(WatchEvent.RECONNECT, this.#retryCount);

Pepr

  // in this context, err is the retryCount and retryCount is always going to be undefined
  watcher.events.on(WatchEvent.RECONNECT, (err, retryCount) =>
    logEvent(WatchEvent.RECONNECT, err ? `Reconnecting after ${retryCount} attempts` : ""),
  );

PR coming up