In Zopeless, mails should be sent only when the transaction is committed
Bug #29744 reported by
Björn Tillenius
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
In Progress
|
Low
|
Colin Watson |
Bug Description
When sending mail in normal Zope mode, as well as in tests, which test the sending of mail, the mail is sent only if the transaction is commited. This is good.
However, when you are in an Zopeless environment, mail is sent immediately. This causes problems with the email interface, since bug notifications get sent out even though the transaction is later aborted. It would be possible to work around this, but it's quite troublesome, and it seems better to fix the real problem, make sending mail in a Zopeless environment have same semantics as in a Zope environment.
Related branches
lp://staging/~cjwatson/launchpad/opt-in-zopeless-immediate-mail
Rejected
for merging
into
lp://staging/launchpad
- Launchpad code reviewers: Pending requested
-
Diff: 421 lines (+67/-49)14 files modifieddaemons/buildd-manager.tac (+2/-8)
lib/lp/bugs/scripts/bugnotification.py (+11/-2)
lib/lp/bugs/scripts/tests/test_bugnotification.py (+1/-1)
lib/lp/bugs/tests/bugs-emailinterface.txt (+6/-11)
lib/lp/code/mail/codehandler.py (+1/-1)
lib/lp/services/job/celeryjob.py (+1/-3)
lib/lp/services/job/runner.py (+8/-7)
lib/lp/services/mail/basemailer.py (+7/-2)
lib/lp/services/mail/sendmail.py (+13/-1)
lib/lp/services/mail/tests/incomingmail.txt (+6/-2)
lib/lp/services/mail/tests/test_incoming.py (+2/-0)
lib/lp/services/scripts/base.py (+1/-6)
lib/lp/testing/layers.py (+1/-5)
scripts/mlist-import.py (+7/-0)
~cjwatson/launchpad:opt-in-zopeless-immediate-mail
Ready for review
for merging
into
launchpad:master
- Launchpad code reviewers: Pending requested
-
Diff: 399 lines (+63/-41)14 files modifieddaemons/buildd-manager.tac (+1/-5)
lib/lp/bugs/scripts/bugnotification.py (+11/-2)
lib/lp/bugs/scripts/tests/test_bugnotification.py (+1/-1)
lib/lp/bugs/tests/bugs-emailinterface.txt (+6/-11)
lib/lp/code/mail/codehandler.py (+1/-1)
lib/lp/services/job/celeryjob.py (+0/-2)
lib/lp/services/job/runner.py (+7/-6)
lib/lp/services/mail/basemailer.py (+7/-2)
lib/lp/services/mail/sendmail.py (+12/-0)
lib/lp/services/mail/tests/incomingmail.txt (+6/-2)
lib/lp/services/mail/tests/test_incoming.py (+4/-0)
lib/lp/services/scripts/base.py (+0/-5)
lib/lp/testing/layers.py (+0/-4)
scripts/mlist-import.py (+7/-0)
Changed in launchpad: | |
assignee: | nobody → stub |
Changed in launchpad: | |
status: | Unconfirmed → Confirmed |
Changed in launchpad: | |
assignee: | stub → nobody |
tags: | added: tech-debt |
Changed in launchpad: | |
assignee: | nobody → Colin Watson (cjwatson) |
status: | Triaged → In Progress |
summary: |
- In Zopeless, mails should be sent only when the transaction is commited + In Zopeless, mails should be sent only when the transaction is committed |
To post a comment you must log in.
Please note that there is code depending on this behaviour in archiveuploader /uploadprocesso r.py. When this bug is fixed, that code will also need to be addressed. Search for "29744" in the file to see the comment in there.