fix(grain): add grain key to idempotency service#2712
Merged
waleedlatif1 merged 2 commits intostagingfrom Jan 7, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryAdded
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant GW as Grain Webhook
participant IS as IdempotencyService
participant PU as provider-utils
participant Cache as Redis/DB
GW->>IS: Webhook Event {type, data: {id}}
IS->>IS: createWebhookIdempotencyKey()
IS->>PU: extractProviderIdentifierFromBody("grain", body)
PU->>PU: extractGrainIdentifier(body)
PU->>PU: Check body.type && body.data?.id
PU-->>IS: Return "type:id" (e.g. "recording_added:uuid")
IS->>IS: normalizeKey(provider, identifier)
IS->>Cache: Check if key exists
alt Key exists (duplicate)
Cache-->>IS: Previous result
IS-->>GW: Return cached result (skip processing)
else Key doesn't exist (first time)
Cache-->>IS: Not found
IS->>Cache: Store key with in-progress status
IS->>IS: Execute webhook operation
IS->>Cache: Store completed result
IS-->>GW: Return result
end
|
waleedlatif1
added a commit
that referenced
this pull request
Jan 8, 2026
* fix(grain): add grain key to idempotency service * fixed dropdown issue for grain, webhook registration
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.
Summary
Type of Change
Testing
Tested manually
Checklist