4759: Webhooks are broken in 3.0.9

splatter2

What version are you running?

3.0.9

What's the URL of the page containing the problem?

N/A

What steps will reproduce the problem?

  1. Create a webhook for the "Review Request published" event. Use defaults for payload (JSON data, no custom content).
  2. Trigger the webhook by publishing a new ReviewRequest

What is the expected output? What do you see instead?

Expect webhook to publish json data to the given URL.
Instead, no data is published to the url, and an error appears in the ReviewBoard server log

What operating system are you using? What browser?

N/A

Please provide any additional information below.

Error from log:

root  - Webhook payload passed to dispatch_webhook_event containing invalid  data types: <type 'long'> is not a valid data type for values in webhook payloads.
    File "/usr/lib64/python2.7/site-packages/reviewboard/notifications/webhooks.py", line 185, in _normalize_value
payload = normalize_webhook_payload(payload, request)Traceback:
...
...
   File "/usr/lib64/python2.7/site-packages/reviewboard/notifications/webhooks.py", line 185, in _normalize_value
  % value_type)
TypeError: <type 'long'> is not a valid data type for values in webhook payloads.  
chipx86
#1 chipx86

Fix up for review. It'll be in 3.0.10. Sorry for the trouble!

https://reviews.reviewboard.org/r/10235/

  • -New
    +PendingReview
  • +Release-3.0.x
  • -Priority:Medium
    +Component:Webhooks
    +Priority:High
david
#2 david
  • -PendingReview
    +Fixed
cyran.norbert
#3 cyran.norbert

Update:
In release 3.0.10 similar problem is still present:

WebHook payload passed to dispatch_webhook_event containing invalid data types: <type 'str'> is not a valid data type for dictionary keys in WebHook payloads.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/reviewboard/notifications/webhooks.py", line 216, in dispatch_webhook_event
payload = normalize_webhook_payload(payload, request)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/notifications/webhooks.py", line 189, in normalize_webhook_payload
return _normalize_value(payload)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/notifications/webhooks.py", line 170, in _normalize_value
for dict_key, dict_value in six.iteritems(value)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/notifications/webhooks.py", line 170, in <dictcomp>
for dict_key, dict_value in six.iteritems(value)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/notifications/webhooks.py", line 181, in _normalize_value
return _normalize_value(result)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/notifications/webhooks.py", line 170, in _normalize_value
for dict_key, dict_value in six.iteritems(value)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/notifications/webhooks.py", line 170, in <dictcomp>
for dict_key, dict_value in six.iteritems(value)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/notifications/webhooks.py", line 170, in _normalize_value
for dict_key, dict_value in six.iteritems(value)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/notifications/webhooks.py", line 170, in <dictcomp>
for dict_key, dict_value in six.iteritems(value)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/notifications/webhooks.py", line 155, in _normalize_key
% key_type)
TypeError: <type 'str'> is not a valid data type for dictionary keys in WebHook payloads.

Webhook is connected to review_request_published.

Should I create a new ticket for this issue?

chipx86
#4 chipx86

There's going to be a fix for this in today's release.