Hi
I'm Alex from Zanata team.
We've recently discussed on getting Zanata webhook to trigger event for Fedora badges. Just wondering who is the best person to talk to?
1) What sort of details does Zanata need to include in the event? 2) Any test instance which we can test the event on?
---------------------------------------------
Alex Eng Globalisation Tools Engineering DID: +61 3514 8262 callto:+61+3514+8262 Mobile: +614 2335 3457 callto:+614+2335+3457
Red Hat, Asia-Pacific Pty Ltd Level 1, 193 North Quay Brisbane 4000 Office: +61 7 3514 8100 callto:+61+7+3514+8100 Fax: +61 7 3514 8199 callto:+61+7+3514+8199 Website: www.redhat.com
On Wed, Dec 02, 2015 at 04:03:22PM +1000, Alex Eng wrote:
Hi I'm Alex from Zanata team.
We've recently discussed on getting Zanata webhook to trigger event for Fedora badges. Just wondering who is the best person to talk to?
- What sort of details does Zanata need to include in the event?
- Any test instance which we can test the event on?
I think the best person for this would be Ralph Bean (aka threebean on irc). We already have something in place to relay github's webhook messages on fedmsg and then badges are then awarded based on fedmsg's messages and history. So once zanata can talk on fedmsg, adding badges should be as simple as any other badges :)
Pierre
On Wed, Dec 02, 2015 at 04:03:22PM +1000, Alex Eng wrote:
Hi
I'm Alex from Zanata team.
We've recently discussed on getting Zanata webhook to trigger event for Fedora badges. Just wondering who is the best person to talk to?
- What sort of details does Zanata need to include in the event?
- Any test instance which we can test the event on?
Hi Alex,
One thing we were waiting was the release of zanata-server-3.8. The 3.7.3 version deployed at https://fedora.zanata.org/ has the webhook feature in place, but it doesn't cryptographically sign the webhook POST requests[1]. We have a mediator service[2] (written some time ago, not yet deployed) to receive those POSTS and republish them to our fedmsg message bus. Our badges awarder listens to that bus and can award badges in response to that. That zanata2fedmsg bridge will need to be updated to verify the signature header once its available.
Beyond that, here are some things which would be nice:
- zanata currently only sends events when translations for a document reach the 100%-completed milestone. It would be nice if we could have more events along the way (like 25%, or 50%, or even if we received a notification every time a new change in translations were uploaded, that would be great). See the original ticket for some discussion[3].
- The message payload only indicates which document reached 100%. We will then have to query the zanata REST api again from our side in order to figure out which translators did the translation -- so we can award them badges. We could skip this extra query if zanata included the usernames of the translators in the original webhook POST.
Cheers, and thanks for the ping on this! -Ralph
[1] - https://bugzilla.redhat.com/show_bug.cgi?id=1213630 [2] - https://github.com/fedora-infra/zanata2fedmsg [3] - https://bugzilla.redhat.com/show_bug.cgi?id=1122776
One thing we were waiting was the release of zanata-server-3.8. The 3.7.3 version deployed at https://fedora.zanata.org/ has the webhook feature in place, but it doesn't cryptographically sign the webhook POST requests[1]. We have a mediator service[2] (written some time ago, not yet deployed) to receive those POSTS and republish them to our fedmsg message bus. Our badges awarder listens to that bus and can award badges in response to that. That zanata2fedmsg bridge will need to be updated to verify the signature header once its available.
Deployment of 3.8 is in progress now. Hopefully before Christmas.
- zanata currently only sends events when translations for a document
reach the 100%-completed milestone. It would be nice if we could have more events along the way (like 25%, or 50%, or even if we received a notification every time a new change in translations were uploaded, that would be great). See the original ticket for some discussion[3].
Agree. Let me follow up for this.
- The message payload only indicates which document reached 100%. We
will then have to query the zanata REST api again from our side in order to figure out which translators did the translation -- so we can award them badges. We could skip this extra query if zanata included the usernames of the translators in the original webhook POST.
I think we should have separate event for documents translation reaching a milestone and contribution badges. For contribution badges, perhaps we can send out webhook event after each translation being saved (not sure if the zanata2fedmsg bridge can handle the load), or queue it up in Zanata and send out every X minutes for that user. Will need you input on this.
---------------------------------------------
Alex Eng Globalisation Tools Engineering DID: +61 3514 8262 callto:+61+3514+8262 Mobile: +614 2335 3457 callto:+614+2335+3457
Red Hat, Asia-Pacific Pty Ltd Level 1, 193 North Quay Brisbane 4000 Office: +61 7 3514 8100 callto:+61+7+3514+8100 Fax: +61 7 3514 8199 callto:+61+7+3514+8199 Website: www.redhat.com
On Thu, Dec 3, 2015 at 3:32 AM, Ralph Bean rbean@redhat.com wrote:
On Wed, Dec 02, 2015 at 04:03:22PM +1000, Alex Eng wrote:
Hi
I'm Alex from Zanata team.
We've recently discussed on getting Zanata webhook to trigger event for Fedora badges. Just wondering who is the best person to talk to?
- What sort of details does Zanata need to include in the event?
- Any test instance which we can test the event on?
Hi Alex,
One thing we were waiting was the release of zanata-server-3.8. The 3.7.3 version deployed at https://fedora.zanata.org/ has the webhook feature in place, but it doesn't cryptographically sign the webhook POST requests[1]. We have a mediator service[2] (written some time ago, not yet deployed) to receive those POSTS and republish them to our fedmsg message bus. Our badges awarder listens to that bus and can award badges in response to that. That zanata2fedmsg bridge will need to be updated to verify the signature header once its available.
Beyond that, here are some things which would be nice:
zanata currently only sends events when translations for a document reach the 100%-completed milestone. It would be nice if we could have more events along the way (like 25%, or 50%, or even if we received a notification every time a new change in translations were uploaded, that would be great). See the original ticket for some discussion[3].
The message payload only indicates which document reached 100%. We will then have to query the zanata REST api again from our side in order to figure out which translators did the translation -- so we can award them badges. We could skip this extra query if zanata included the usernames of the translators in the original webhook POST.
Cheers, and thanks for the ping on this! -Ralph
[1] - https://bugzilla.redhat.com/show_bug.cgi?id=1213630 [2] - https://github.com/fedora-infra/zanata2fedmsg [3] - https://bugzilla.redhat.com/show_bug.cgi?id=1122776
infrastructure mailing list infrastructure@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/infrastructure@lists.fedoraprojec...
Deployment of 3.8 is in progress now. Hopefully before Christmas.
Awesome!
- zanata currently only sends events when translations for a document
Agree. Let me follow up for this.
- The message payload only indicates which document reached 100%. We
I think we should have separate event for documents translation reaching a milestone and contribution badges.
Sounds good!
For contribution badges, perhaps we can send out webhook event after each translation being saved (not sure if the zanata2fedmsg bridge can handle the load), or queue it up in Zanata and send out every X minutes for that user. Will need you input on this.
I feel sure we can handle the load of receiving them as soon as they're available. Still, it would make sense for zanata to queue them on the side and send them from a separate asynchronous process. If the main zanata-server web process sends the webhook POSTs, an attacker could maybe create a receiving webapp that accepts part of the POST but then misbehaves and intentionally stalls (which could cause zanata-server to stall out?). Sending asynchronously but rapidly sounds good here.
On Thu, Dec 03, 2015 at 04:36:32AM -0000, Ralph Bean wrote:
Deployment of 3.8 is in progress now. Hopefully before Christmas.
Awesome!
- zanata currently only sends events when translations for a document
Agree. Let me follow up for this.
- The message payload only indicates which document reached 100%. We
I think we should have separate event for documents translation reaching a milestone and contribution badges.
Sounds good!
For contribution badges, perhaps we can send out webhook event after each translation being saved (not sure if the zanata2fedmsg bridge can handle the load), or queue it up in Zanata and send out every X minutes for that user. Will need you input on this.
I feel sure we can handle the load of receiving them as soon as they're available. Still, it would make sense for zanata to queue them on the side and send them from a separate asynchronous process. If the main zanata-server web process sends the webhook POSTs, an attacker could maybe create a receiving webapp that accepts part of the POST but then misbehaves and intentionally stalls (which could cause zanata-server to stall out?). Sending asynchronously but rapidly sounds good here.
Or simply times-out. I had the problem with pagure where the app was waiting for the request to end (ranging from very quickly to waiting for it to time out) before returning. Needless to say that if the web-hook server was to time-out, pagure was going for it as well. So async++ :)
Pierre
infrastructure@lists.fedoraproject.org