send-bug-notifications OOPSes: IndexError: list index out of range

Bug #2023938 reported by Colin Watson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Simone Pelosi

Bug Description

Since https://code.launchpad.net/~pelpsi/launchpad/+git/launchpad/+merge/442903 was deployed, we've been seeing lots of OOPSes like this (see `scripts.lp.internal::launchpad-production-logs/send-bug-notifications.log`):

  2023-06-14 00:01:20 ERROR Error while building email notifications.
  Traceback (most recent call last):
    File "/srv/launchpad.net/production/launchpad-rev-2edb915d3e46a38cd09521fa848436c630bd11ce/lib/lp/bugs/scripts/bugnotification.py", line 323, in get_email_notifications
      yield construct_email_notifications(batch)
    File "/srv/launchpad.net/production/launchpad-rev-2edb915d3e46a38cd09521fa848436c630bd11ce/lib/lp/bugs/scripts/bugnotification.py", line 206, in construct_email_notifications
      reason = data["sources"][0].reason_body
  IndexError: list index out of range
  2023-06-14 00:01:20 INFO OOPS-2840cc064513a0d4c93d870df417cfa7

I'm guessing that perhaps this happens when a user has every subscription via which they might receive a given bug muted, or something like that.

Related branches

Simone Pelosi (pelpsi)
Changed in launchpad:
assignee: nobody → Simone Pelosi (pelpsi)
Simone Pelosi (pelpsi)
Changed in launchpad:
importance: Undecided → High
status: New → In Progress
Simone Pelosi (pelpsi)
Changed in launchpad:
status: In Progress → Fix Committed
Colin Watson (cjwatson)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.