Maintainer notifications - abrt/faf GitHub Wiki

Goal

Provide push notifications to package maintainers.

Notification events

New bugzilla attached

Probably unnecessary, since bugzilla sends it's own e-mails.

New user comment attached

Comments are usually highly appreciated by maintainers.

New report

Would cause many notifications. Probably only suitable for Fedmsg delivery. Could be on by default.

New problem

Would be noisy due to the fact that problem creation is noisy, i.e. sometimes two problems merge into one, sometimes they split.

Report count reaches a given threshold

Let the threshold be 1000. It's then possible to have a problem with 10 reports, each having a count of 900. This would not trigger.

Choosing a threshold

Maintainer should be able to specify a threshold for each package separately. The default could be some kind of statistic based on report counts for the given package in the last year. (Possibly a median or a finely tuned percentile)

Implementation

  • Save counts for every package at the beginning of the day (JSON or pickle)
  • Compare to count at the end of the day
  • Send out notifications for those that passed the threshold

OR

  • Compare sum of ReportHistoryDaily until yesterday with sum until today

Notes

The notification email should include information about the parent problem which the notified report belongs to. FAF should be able to track history of parent problems for each report and include information about these changes in the notification emails. FAF should also use a single message ID for all reports grouped in a single problem. The same message ID will allow e-mail clients to group the notifications sent by FAF and the recipients should be less confused.

Problem count reaches a given threshold

As in "New problem", the noisiness could cause duplicate and false notifications.

Notification delivery

Fedmsg

Message sample:

"msg": {
    "url": "https://retrace...../",
    "report_id": 1234,
    "problem_id": 4321,
    "function": "hsw_disable_lcpll",
    "component": "kernel",
    "first_occurrence": "2015-04-01",
    "count": 1001,
    "type": "kerneloops",
}

Topics: org.fedoraproject.{env}.faf.report.threshold{count}, org.fedoraproject.{env}.faf.problem.threshold{count}

Thresholds are power of 10s (10**n for n in range(7)). This way package maintainers can subscribe to notifications about their packages by choosing the appropriate threshold.

Add meta to https://github.com/fedora-infra/fedmsg_meta_fedora_infrastructure/tree/develop/fedmsg_meta_fedora_infrastructure (converting JSON message to text)

Add rules to https://github.com/fedora-infra/fmn.rules

Optionally modify https://github.com/fedora-infra/fmn.consumer/blob/develop/fmn/consumer/backends/mail.py to contain thread-id with to reference reports to the same problem

Command to publish messages is to be run once a day separately for problems and reports.

Final implementation