QA/MailHandling

Not logged in - Log In / Register

QA for mail incoming/outgoing mail processing

Responding to incoming email and sending out results email are two major functions of Launchpad which makes the QA of changes to those functions extremely important. However doing that QA requires interacting with lots of moving parts, many of which need to be run on-demand on staging and qastaging.

Incoming email

To test incoming email, find a target that you are sure exists on the QA machine. For instance, to QA incoming bug mail handling on qastaging, simply find an appropriate bug that you are sure exists on that system. The key is to not just pick a bug number from production because it may not exist in the staging database. Once selected, send an email to that bug on the appropriate machine. So to test incoming bug mail processing for bug 154556 on qastaging, the address to use is 154556@bugs.qastaging.launchpad.net.

In production the cronscript process-mail.py is run regularly (every three minutes). On staging and qastaging that process is run less frequently, but still regularly (every ten minutes).

The results from process-mail are not interesting but the log file is.

You can get the log file on devpad at /srv/launchpad.net-logs/<SUBSYSTEM>/.... Read how to expedite log retrieval at FreshLogs.

The script process-mail.py logs by default at the EXCEPTION level. If you need to get INFO level debugging ask that it be run like: cronscripts/process-mail.py --log-file=INFO:pm.log and request the log file be pasted.

Outbound email

Once a process has been run that generates outbound email has completed, such as bug notifications, an on-demand script needs to be run to process it. Ask a losa to run cronscripts/send-bug-notifications.py -vv and paste the results. Usually the verbose output will contain all of the data you need. If not you'll have to look at the staging/qastaging IMAP mailbox. (The two go to the same mailbox but qastaging email has '[QASTAGING]' added as a subject-line prefix.) Details on how to access the mailbox are at ConnectToStagingMailbox.

Usually there will be queued bug notifications that need to be processed before those from the activity you want to QA. You should have the cronscripts/send-bug-notifications.py run to clear those out, perform your action, and then run it again with the -vv option to isolate the emails of interest.

QA/MailHandling (last edited 2015-09-14 08:20:32 by cjwatson)