Skip to content

feat(worker): de-duplicate webhook processing by delivery id#89

Open
abdrassulov wants to merge 2 commits into
Grainlify:mainfrom
abdrassulov:feat/webhook-idempotency
Open

feat(worker): de-duplicate webhook processing by delivery id#89
abdrassulov wants to merge 2 commits into
Grainlify:mainfrom
abdrassulov:feat/webhook-idempotency

Conversation

@abdrassulov

Copy link
Copy Markdown

📌 Description

This PR implements de-duplication/idempotency for the GitHub webhook consumer based on the unique ID header, preventing duplicate side-effects (such as duplicate sync jobs or bot comments) on webhook redeliveries.

✅ Solution

  • Created a new database migration (/) introducing the table.
  • Added atomic de-duplication checks at the beginning of to skip duplicate event processing using .
  • Added a background cleanup worker to that periodically deletes processed deliveries older than 7 days.
  • Fixed pre-existing bugs in the database integration test file () regarding mismatched installation IDs.
  • Added a full integration test verifying the de-duplication and cleanup worker behaviors.

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.

1 participant