-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
500 error occurs when Webhook is executed with SURVEY set in Template or Workflow #5062
Comments
@sky-joker any chance you could share the contents of your awx logs (with a 500 error, you should see a verbose error, which should give us some clues about what's wrong). |
Hi, @ryanpetrello The error log is as follows.
thanks |
@sky-joker any chance you could share the output of ...where |
Okay, I'm able to reproduce this by:
|
Any chance this diff helps for you? diff --git a/awx/api/views/webhooks.py b/awx/api/views/webhooks.py
index e3ed6e64c9..dbdd3916bc 100644
--- a/awx/api/views/webhooks.py
+++ b/awx/api/views/webhooks.py
@@ -151,13 +151,13 @@ class WebhookReceiverBase(APIView):
'webhook_credential': obj.webhook_credential,
'webhook_guid': event_guid,
},
- 'extra_vars': json.dumps({
+ 'extra_vars': {
'tower_webhook_event_type': event_type,
'tower_webhook_event_guid': event_guid,
'tower_webhook_event_ref': event_ref,
'tower_webhook_status_api': status_api,
'tower_webhook_payload': request.data,
- })
+ }
}
new_job = obj.create_unified_job(**kwargs) |
Yes :)
|
I think something like this should help: I can put together a PR shortly. |
Applying this patch(#5062 (comment)) resolved this issue :) |
Verified this issue, the job is launched successfully now. Hence, closing the issue |
ISSUE TYPE
SUMMARY
If I set the URL of AWX Template or Workflow (SURVEY added) to GitHub Webhook and execute it, a 500 error will occur.
Error Response Body
If SURVEY is not added, no error will occur.
ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
I was expecting the Template to execute via webhook.
ACTUAL RESULTS
500 Internal Server Error
ADDITIONAL INFORMATION
The text was updated successfully, but these errors were encountered: