From 09e62df84a9ffcf4bb90588db2ed41a57ab33336 Mon Sep 17 00:00:00 2001 From: beeankha Date: Tue, 26 May 2020 15:47:30 -0400 Subject: [PATCH 1/2] Fix approval notifications for PagerDuty --- awx/main/notifications/pagerduty_backend.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/awx/main/notifications/pagerduty_backend.py b/awx/main/notifications/pagerduty_backend.py index 45869a34db..a3f360255d 100644 --- a/awx/main/notifications/pagerduty_backend.py +++ b/awx/main/notifications/pagerduty_backend.py @@ -13,6 +13,7 @@ from awx.main.notifications.custom_notification_base import CustomNotificationBa DEFAULT_BODY = CustomNotificationBase.DEFAULT_BODY DEFAULT_MSG = CustomNotificationBase.DEFAULT_MSG +DEFAULT_APPROVAL_RUNNING_MSG = CustomNotificationBase.DEFAULT_APPROVAL_RUNNING_MSG logger = logging.getLogger('awx.main.notifications.pagerduty_backend') @@ -30,10 +31,10 @@ class PagerDutyBackend(AWXBaseEmailBackend, CustomNotificationBase): default_messages = {"started": {"message": DEFAULT_MSG, "body": DEFAULT_BODY}, "success": {"message": DEFAULT_MSG, "body": DEFAULT_BODY}, "error": {"message": DEFAULT_MSG, "body": DEFAULT_BODY}, - "workflow_approval": {"running": {"message": DEFAULT_MSG, "body": DEFAULT_BODY}, - "approved": {"message": DEFAULT_MSG,"body": DEFAULT_BODY}, - "timed_out": {"message": DEFAULT_MSG, "body": DEFAULT_BODY}, - "denied": {"message": DEFAULT_MSG, "body": DEFAULT_BODY}}} + "workflow_approval": {"running": {"message": DEFAULT_APPROVAL_RUNNING_MSG, "body": DEFAULT_BODY}, + "approved": {"message": DEFAULT_APPROVAL_RUNNING_MSG,"body": DEFAULT_BODY}, + "timed_out": {"message": DEFAULT_APPROVAL_RUNNING_MSG, "body": DEFAULT_BODY}, + "denied": {"message": DEFAULT_APPROVAL_RUNNING_MSG, "body": DEFAULT_BODY}}} def __init__(self, subdomain, token, fail_silently=False, **kwargs): super(PagerDutyBackend, self).__init__(fail_silently=fail_silently) From 8ab885de934890e6113424d09667c715c6392c44 Mon Sep 17 00:00:00 2001 From: beeankha Date: Wed, 27 May 2020 09:34:51 -0400 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 098004978e..48a9c4bfd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This is a list of high-level changes for each release of AWX. A full list of com - Fixed a bug in awx-manage run_wsbroadcast --status in kubernetes (https://github.com/ansible/awx/pull/7009) - Fixed a bug that broke notification toggles for system jobs in the UI (https://github.com/ansible/awx/pull/7042) - Fixed a bug that broke local pip installs of awxkit (https://github.com/ansible/awx/issues/7107) +- Fixed a bug that prevented PagerDuty notifications from sending for workflow job template approvals (https://github.com/ansible/awx/issues/7094) ## 11.2.0 (Apr 29, 2020)