Skip to content

Retry failed Index webhook deliveries - #432

Open
Hades32sBot wants to merge 1 commit into
coredevices:masterfrom
Hades32sBot:index-webhook-retries
Open

Hades32sBot wants to merge 1 commit into
coredevices:masterfrom
Hades32sBot:index-webhook-retries

Conversation

@Hades32sBot

@Hades32sBot Hades32sBot commented Sep 20, 2026 •

Copy link
Copy Markdown

Summary

  • Webhook uploads were fire-and-forget: a non-2xx response or network error was logged to run history and permanently dropped. This adds in-memory retries on transient failures — network errors/timeouts, HTTP 408, 429, and 5xx — with 1s/2s/5s backoff (3 retries).
  • Other 4xx responses and signing errors still fail immediately (retrying can't help them), and sendTestEvent stays single-shot so the settings UI gets instant feedback.
  • Adds a retryable flag to IndexWebhookRunResult and an isRetryableStatus predicate, covered by a new unit test.

Note: this is deliberately in-memory only — it covers brief connectivity blips but not a dead endpoint or killed app process. A persisted retry queue (in the style of MemfaultChunkQueue) could be a follow-up if wanted.

Test plan

  • New IndexWebhookRetryTest covers the retryable-status predicate and backoff bounds
  • Manual: configure webhook to an endpoint returning 503, then 200 — verify retry succeeds and run history records the final result
  • Manual: configure webhook to unroutable host — verify ~8s of retries then FAILED in run history

cc @Hades32

Webhook uploads were single-shot: a non-2xx response or network error was
recorded in the run history and dropped. Retry in-memory on transient
failures — network errors/timeouts, 408, 429, and 5xx — with 1s/2s/5s
backoff. Other 4xx and signing errors still fail immediately, and the
test event stays single-shot so the settings UI gets instant feedback.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@CLAassistant

CLAassistant commented Sep 20, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants