Closed Bug 1372529 Opened 7 years ago Closed 7 years ago

pulse-notify should allow tasks without notifications on exceptions

Categories

(Release Engineering :: Release Automation: Other, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jlorenzo, Assigned: jlorenzo)

References

Details

Attachments

(1 file)

54 bytes, text/x-github-pull-request
csheehan
: review+
Details | Review
In bug 1348844, we started using pulse-notify to send emails to release-drivers. To do so, we only provided the task-completed configuration[1]. Since then, pulse-notify has been yelling with the following errors:


> Jun 13 00:06:03 heroku-release-notifications app/worker.1: 2017-06-13 07:06:03,396 - pulsenotify.consumer - ERROR - Task(id=_jqt7K9wSoSy97y-Z48ayw, status=task-exception) has no notification configuration. 
> Jun 13 00:06:03 heroku-release-notifications app/worker.1: KeyError: 'task-exception' 
> Jun 13 00:06:03 heroku-release-notifications app/worker.1:     raise StatusNotificationsNotConfiguredError() from ke 
> Jun 13 00:06:03 heroku-release-notifications app/worker.1: pulsenotify.consumer.StatusNotificationsNotConfiguredError 

Let's make pulse-notify less strict. 

[1] https://github.com/mozilla-releng/releasetasks/blob/b91176d45400124eb196eab86329074e7e0f1e48/releasetasks/templates/notification/email_release_drivers_task.yml.tmpl#L46
Attached file pulse-notify PR
Do you think it's a good way of fixing the issue, Connor? Or would you prefer that tasks define a config for every status?
Attachment #8877094 - Flags: review?(csheehan)
Assignee: nobody → jlorenzo
Looks good to me, I think it makes more sense to just omit a configuration when you don't want a notification. So this patch should do the trick. :)
Attachment #8877094 - Flags: review?(csheehan) → review+
Cool!

Landed on master and production at https://github.com/mozilla-releng/pulse-notify/commit/6dd424444f76202eda36fa4112d9c0dae5be3e75
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
See Also: → 1355483
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: