#martin_events-duplicate

1 messages ยท Page 1 of 1 (latest)

dreamy surgeBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1291421713493528657

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

late raven
#

Will dig into why these duplicates are sent, but your endpoint should be idempotent

#

So that duplicate event processing doesn't cause issues

scarlet aspen
#

Hmm yes I know it should be idempotent, but this is a bit tricky there.
Actually this event does trigger an email sending to the user, and we do want this email to be sent each time there are new requirements, but not several times for the same event.
As those events have different IDs, we can't rely on it for the idempotency.
The only solution I can see right now would be to check whether a similar one (with the same previous_attributes) has been processed in the previous 10 seconds or so (completely arbitrary), but they are all sent within a 1 or 2 seconds period, which would lead to probable race conditions as they are processed at the same time.

late raven
#

Yeah I'm seeing previous issues where this happened

#

Most likely a bug on our end

dreamy surgeBOT
scarlet aspen
#

Thanks for investigating ๐Ÿ™

tepid dome
#

martin_events-duplicate

scarlet aspen
#

And another thing I noticed while investigating this issue :
In the webhooks developer dashboard, when we select an connect event related to a deleted account, the details panel doesn't show the selected event but keeps on showing the last one successfully displayed (see screenshot, where I selected a account.updated event, but it displays a capability.updated one in the details panel).
It seems to be related to an error while fetching the event, about the account not existing.
Does it mean we cannot inspect events related to deleted accounts?
If so, the UX isn't really clear, and we could easily inspect the wrong event if we don't pay attention to the date ๐Ÿ™ˆ
I can open another ticket if need be.

tepid dome
#

yeah deleted accounts likely don't let you inspect them. I'd recommend flagging that bug too

scarlet aspen
#

Alright, I'll contact them. Thanks for your time