Some bugs don't fail for the user who is still around. They fail for a user who is already gone, in a background job that cannot possibly succeed, and they leave a trail of retries in the dead set.
This is the story of gitlab-org/gitlab!268706 . It stops GitLab from trying to send a note notification after the recipient has been deleted, and it went through a review that made both the guard and the specs stricter. I'll cover the issue, the first version, and the two review comments that changed it.
The issue: the same failure, on the other lookup
The issue was gitlab-org/gitlab#638487 , opened by Danny Bailey. It is a follow-up, and that matters.
An earlier MR, !267804 , had fixed the same shape of failure for deleted notes . Emails::Notes#setup_note_mail used to load the note with a find that raises when the record is missing.…