Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api/cannon: Stop retrying invalid webhooks forever #2167

Merged
merged 1 commit into from
May 10, 2024

Conversation

victorges
Copy link
Member

What does this pull request do? Explain your changes. (required)

Turns out there were never any suspended users sending webhooks. Only webhooks
that never got acked from the queue after they got suspended.

When we got an invalid webhook for a deleted or suspended user or stream,
we threw an error from the fucntion that processes the events. Problem was the
caller of that function was retrying on any generic errors.

Made them throw an explicit UnprocessableEntityError instead so we drop
the messages accordingly.

Specific updates (required)

  • Throw UnprocessableEntityError from main process func
  • Handle that error and make sure we ack messages from them
  • Remove explicitly handling for recording.waiting events, we can just rethrow now

How did you test each of these updates (required)
yarn test

Does this pull request close any open issues?
Not sure, we talked about it tho and the webhook queue is never empty.

Checklist

  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@victorges victorges requested a review from a team as a code owner May 6, 2024 12:51
Copy link

vercel bot commented May 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
livepeer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2024 0:53am

Copy link
Member

@gioelecerati gioelecerati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@victorges victorges merged commit e59ea27 into master May 10, 2024
8 checks passed
@victorges victorges deleted the vg/fix/eternal-webhooks branch May 10, 2024 16:53
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.

None yet

2 participants