webhook2fedmsg
Purpose
This investigation’s goal is to explore a possible new application that will convert webhooks from different services to Fedora messaging messages.
Resources
Initiative proposal: https://pagure.io/cpe/initiatives-proposal/issue/18
Requirements
User can log in using FAS account
User can link different webhook services to FAS account
Application will listen for the webhook POST requests
Application will provide endpoint for each service
POST request will be validated against the known tokens for the service
Support for GitHub
Support for Discourse
CI - Recommending Zuul CI or Github Actions
Documentation - Documentation could be hosted on readthedocs.org
OpenShift deployment
Unit tests - Recommending tox
Fedora messaging schema
Easy to use dev env - Recommending either vagrant or containerized environment
Nice to have
List of features that would be nice to have.
Investigation
Following it the design document for webhook2fedmsg.
Implementation
The implementation details of the project can be found here.
The Good Points
Supports multiple webhook services
Easier to maintain - less codebases
Easier to add new webhook service in future
Users can manage tokens by themselves
With this solution we don’t need to rewrite github2fedmsg - one less initiative
The Bad points
Initial work - completely new app
Another application to maintain - However this will allow us to get rid of few others
Manual work with tokens and webhooks on webhook service side for users
Conclusions
This application will help us to lower our codebase. We wouldn’t need to maintain multiple applications service2fedmsg anymore, but everything that provides webhook could be managed by this application. It is definitely something we have knowledge and skills to do.
Proposed Roadmap
Step 1 - Write new app with tests and documentation
Step 2 - Create separate repository with message schemas
Step 3 - Deploy in staging
Step 4 - Inform community this service is available for testing
Step 5 - Deploy in production
Step 6 - Community blog announcing this new service
Estimate of work
This work will need at least 2 developers, one with web frontend skill set. The estimation for this project is 12 weeks.