Menu

1 / 2

A job that could never succeed: skipping note emails for deleted recipients

DEV Community: ruby·Priyanshu Jha·2 days ago
#8F34vV9z
#devtoruby#devto#dev#setup_note_mail#note_
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.