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

[#2275] Allow for multiple webhooks and event filtering #2286

Merged
merged 8 commits into from Aug 23, 2021

Conversation

chrismatix
Copy link
Contributor

@chrismatix chrismatix commented Aug 13, 2021

resolves #2275

TODO:

  • send events out to all webhooks
  • filter on event list
  • Add X-Airy-Content-Signature header

Upgrade procedure:

  1. Note down webhook data /webhooks.info
    1.1 Call /webhooks.info and note down url and headers
    1.2 At 9. call the /webhooks.subscribe with this data
  2. Scale down admin app, webhook integration
  3. Delete and re-create webhooks topic
  4. Clear beanstalkd
  5. Reset admin app
  6. Reset webhook publisher consumer group and remove them
  7. Upgrade image tags
  8. Scale webhook integration back up
  9. Once caught up, re-subscribe webhook

If there is no existing webhook, steps 2. - 4. can be skipped. If there is no pre-existing webhook deployment at all, then only the admin app needs to be reset.

@chrismatix chrismatix marked this pull request as ready for review August 18, 2021 15:55
pathType: Prefix
backend:
service:
name: api-communication
port:
number: 80
- path: /conversations.info
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ljupcovangelski and @pascal-airy I simplified this file a lot by using prefix matching. We don't have to specify every single route if e.g. all /conversations* routes go to api-communication.


onEvent = (body: string) => {
const json = JSON.parse(body) as EventPayload;
switch (json.type) {
case 'channel':
case 'channel.updated':
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AudreyKj and @thorstenairy The websocket event names will change a bit in the next release.

ljupcovangelski added a commit that referenced this pull request Aug 23, 2021
ljupcovangelski added a commit that referenced this pull request Aug 23, 2021
@chrismatix chrismatix merged commit 1044151 into develop Aug 23, 2021
@chrismatix chrismatix deleted the feat/2275-multiple-webhooks branch August 23, 2021 17:21
ljupcovangelski added a commit that referenced this pull request Aug 24, 2021
ljupcovangelski added a commit that referenced this pull request Aug 24, 2021
ljupcovangelski added a commit that referenced this pull request Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom sources: Multiple Webhooks and filtering
3 participants