Project

General

Profile

Actions

Bug #5471

open

Webhook integration failing: need more than 3 values to unpack

Added by Michael Davis almost 6 years ago. Updated almost 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
01.06.2018
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

After updating from 4.11.5 to 4.12.2, our webhook integrations seem to be failing somewhere before RhodeCode actually makes the web request.

I couldn't find anything in any of the log files explaining what was happening, but the rhodecode_celery.log file indicated that the webhooks were going through celery. I was able to get the following error log by running profile/bin/celery events --app rhodecode.lib.celerylib.loader --ini ./rhodecode.ini -d from the ~/.rccontrol/enterprise-1 directory while triggering a webhook (sensitive details have been edited):

celery@rhodecode [2018-05-31 22:48:03.376921] task failed: rhodecode.integrations.types.webhook.post_to_webhook(c89cc6e8-e065-44ea-9d35-52c1e6ae3216) args=([('http://our.webhook.url/', {...}, {...})], {'password': '', 'custom_header_val': '', 'events': ['pullrequest-merge', 'pullrequest-create', 'repo-push', 'pullrequest-close', 'repo-create', 'pullrequest-review', 'pullrequest-comment', 'pullrequest-update'], 'url': 'http://our.webhook.url/', 'secret_token': '', 'method_type': 'post', 'custom_header_key': '', 'username': ''}) kwargs={} clock=8026579, exception=ValueError('need more than 3 values to unpack',), local_received=1527806883.38, pid=7057, traceback=Traceback (most recent call last):
  File "/opt/rhodecode/store/xbrm874sqm0iqz8cww1vy98l7br2bh7b-python2.7-celery-4.1.0/lib/python2.7/site-packages/celery/app/trace.py", line 374, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/opt/rhodecode/store/hrv1v1186rjwls7qbb8c3h45dv9n1frd-python2.7-rhodecode-enterprise-ce-4.11.5/lib/python2.7/site-packages/rhodecode/lib/celerylib/loader.py", line 294, in __call__
    return super(RequestContextTask, self).__call__(*args, **kwargs)
  File "/opt/rhodecode/store/xbrm874sqm0iqz8cww1vy98l7br2bh7b-python2.7-celery-4.1.0/lib/python2.7/site-packages/celery/app/trace.py", line 629, in __protected_call__
    return self.run(*args, **kwargs)
  File "/opt/rhodecode/store/hrv1v1186rjwls7qbb8c3h45dv9n1frd-python2.7-rhodecode-enterprise-ce-4.11.5/lib/python2.7/site-packages/rhodecode/integrations/types/webhook.py", line 373, in post_to_webhook
    for url, token, headers, data in url_calls:
ValueError: need more than 3 values to unpack
, utcoffset=5

Actions #1

Updated by Marcin Kuzminski [CTO] almost 6 years ago

webhook sligtly changed since 4.11 series, and what it seems from the logs you posted, maybe celery wasn't restarted correctly ? It would like some processes left over loaded the old 4.11 code, and it fails executing it.

Please try to restart celery so it loads new 4.12 webhooks code.

Actions #2

Updated by Michael Davis almost 6 years ago

That seems to have been the case; it looks like things are working again after restarting everything. Sorry for the trouble, and thanks!

Actions

Also available in: Atom PDF