Patchwork development: notification branch

Jeremy Kerr jk at ozlabs.org
Wed Mar 30 15:07:53 EST 2011


Hi all,

I've just pushed a new branch ('notifications') to the patchwork git 
repository:

 http://git.ozlabs.org/?p=patchwork;a=shortlog;h=refs/heads/notifications

This is a topic branch to implement a feature that has been requested by 
patchwork maintainers: to notify patch submitters when their patches are 
updated (ie, the state changes) in patchwork. This feature is enabled on a 
per-project basis by the patchwork administrator.

Notifications are batched: patchwork tries to merge multiple update 
notifications to the same user into one email. There is a delay (defined by 
the NOTIFICATION_DELAY_MINUTES setting) between when a patch notification is 
generated (ie, the patch is updated) and the notification is sent, to allow 
for this merging.

To prevent unwanted mailouts, I've implemented an 'email settings' interface, 
which allows unregistered users to opt-out of automated patchwork mail. This 
opt-out (and opt-back-in) is completed through an email confirmation message.

Rather than duplicating the confirmation system used in the registration 
process, I've unified this with the 'add an email to this account' 
confirmation system, to make a generic confirmation layer for patchwork. The 
opt-out system just adds another type of confirmation.

This also means that we no longer use the external registration django app, 
which has shown to be a problem with version incompatibilites.

Over the next week (pending any problems), I'll roll this branch into the 
system at patchwork.ozlabs.org, and enable notifications where requested. 
After that has had some testing, I'll merge this branch into the master 
development branch.

If you're looking to use this new branch:

 * You can remove the dependency on the django-registration app
 * You'll need to run through the new SQL migration scripts
 * You'll need to create a cron task to send notifications:
    apps/patchwork/bin/patchwork-cron.py
 * Old account registration confirmation codes will be invalid

If the last item is a problem, get in touch with me and we can work out a 
migration strategy that preserves existing confirmations. I imagine that this 
will involve some database updates and a little Apache configuration magic.

Let me know if you have any comments.

Cheers,


Jeremy


More information about the Patchwork mailing list