feat: implement configurable exponential backoff for webhook retries - #904
Open
barry01-hash wants to merge 2 commits into
Open
feat: implement configurable exponential backoff for webhook retries#904barry01-hash wants to merge 2 commits into
barry01-hash wants to merge 2 commits into
Conversation
- Add migration 047_webhook_retry_backoff for per-endpoint retry config columns - Add retryMaxAttempts, retryBaseDelayMs, retryMaxDelayMs, retryBackoffMultiplier, retryJitterRatio to webhook_endpoints - Add computeRetryDelay helper with exponential backoff + jitter support - Fix next_retry_at bug where RETRY_DELAYS[Math.min(0,0)] always used index 0 - Update createEndpoint/updateEndpoint to accept backoff configuration - Update webhook delivery worker to use endpoint-specific retry policies - Update mapToEndpoint to include new backoff fields - Add WebhookRetryConfig type with safe defaults (7 retries, 1s base, 2x multiplier, 0.2 jitter, 1h max) - Add validation constraints: maxAttempts 1-20, baseDelay >=100ms, multiplier 1-10, jitter 0-1 - Update outbox service to support backoff config in create/update
|
@barry01-hash Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
Author
|
Please merge |
Contributor
|
Please fix the failed check |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #815
Description
Type of Change
Related Issue
Closes #
Changes Made
Testing
npm run test:unit)npm run test:integration)Manual test steps (if applicable):
Migration Changes
npm run migrate:makenpm run migrate:validatedown()function tested locallyDocumentation
README.mdupdated (new commands, endpoints, or setup steps)docs/file updated.env.exampleupdated (new environment variables)backend/docs/API.mdupdated (new or changed endpoints)Checklist
maintype(scope): summary)npm run lint,cargo clippy)npm run build,cargo build --release)console.log/println!left in production code.envfiles committedCI Status
Screenshots
Breaking Changes
Additional Notes