Skip to content

Should send emails for (certain) failures

For example, if the git fetch fails (perhaps because the repo has the wrong permissions or the user deleted the tag or something), all we get right now is an entry in the list of jobs on the service webpage, and some log entries.

When to send emails

We should probably send emails in t2usm if:

  • The tag has an unsupported critical extension (I think maybe this is the only case that might be detected during the webhook, which probably means we need to defer it)
  • Fetch fails
  • Worker disconnection

I think this is every failure other than NotForUs and an irrecoverable message from the worker (and excluding Duplicate).

Where to send emails

We don't have an email address in the webhook payload, which is all we have to go on. But we do have the gitlab user_id and we can get the email address by querying https://salsa.debian.org/api/v4/users/193. Presumably this should happen with a service account and we'd need to make a gitlab API token.

If the attempt to find the email address, or to send the email, fails, we don't really have a good response. We can just note it on the web page.

Early failures on the worker

I think there are some circumstances where the worker wouldn't email anybody. Eg, wrong tag signer. Currently I don't think the worker tells the manager whether this happened. If it did, the manager could send an email itself using the gitlab info.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information