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

notification service: add webhook notifications #339

Open
5 tasks
sgotti opened this issue Apr 28, 2022 · 0 comments
Open
5 tasks

notification service: add webhook notifications #339

sgotti opened this issue Apr 28, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@sgotti
Copy link
Member

sgotti commented Apr 28, 2022

Currently the notification service is used to update commit status on the remote sources, it listens for agola runservice events and updated the related commit status.

Single runs can have their dedicated tasks to do custom notifications but they are defined per project run.

To let agola deployers be able to handle additional custom notifications (like email, chat etc...) for all the agola run service events we could enhance the notificaton service to send a webhook to some external services. The external services will be outside the agola main scope (perhaps create a generic example service as an additional project inside the agola org) and they'll implement their own logic and do their kind of notification.
Since we cannot cover every possible use case we'll avoid polluting the configstore and the ui with notification related configuration, the external services we'll have their own configuration (with their own configuration file/database or whatever and they could have an external ui not related to the agola ui or the agola ui could be extended by deployers to also contain the notifications config) and once they received the webhook they'll implement their own custom logic to send final notifications.

Implementation steps:

  • Define the webhook data format.
  • Enhance the run events provided by the runservice to contain all the information required to populate the webhook data.
  • Define the webhook configuration format for the notification service.
  • Implement webhook sending in the notification service.

Additional implementatin steps

  • Implement retry logic if webhook delivery to a remote service fails

As a note, deployers could also develop their external service to directly read from the runservice run events instead of relying on webhooks sent from the notification service. This implementation will avoid this work by defining a generic webhook format and help us understand what needs to be enhanced on the agola services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant