launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #19232
[Merge] lp:~cjwatson/launchpad/recipe-mail-header-archive into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/recipe-mail-header-archive into lp:launchpad.
Commit message:
Add an X-Launchpad-Archive header to recipe build notifications.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #776160 in Launchpad itself: "mail headers inconsistent between package and recipe builds"
https://bugs.launchpad.net/launchpad/+bug/776160
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/recipe-mail-header-archive/+merge/269068
Add an X-Launchpad-Archive header to recipe build notifications.
This is just a minor consistency improvement to match package build notifications.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/recipe-mail-header-archive into lp:launchpad.
=== modified file 'lib/lp/code/mail/sourcepackagerecipebuild.py'
--- lib/lp/code/mail/sourcepackagerecipebuild.py 2015-08-23 22:53:55 +0000
+++ lib/lp/code/mail/sourcepackagerecipebuild.py 2015-08-25 14:16:48 +0000
@@ -47,6 +47,7 @@
headers = super(
SourcePackageRecipeBuildMailer, self)._getHeaders(email, recipient)
headers.update({
+ 'X-Launchpad-Archive': self.build.archive.reference,
'X-Launchpad-Build-State': self.build.status.name,
})
return headers
=== modified file 'lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py'
--- lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py 2014-07-09 05:33:07 +0000
+++ lib/lp/code/mail/tests/test_sourcepackagerecipebuild.py 2015-08-25 14:16:48 +0000
@@ -86,6 +86,8 @@
'recipe-build-status',
ctrl.headers['X-Launchpad-Notification-Type'])
self.assertEqual(
+ '~archiveowner/ubuntu/ppa', ctrl.headers['X-Launchpad-Archive'])
+ self.assertEqual(
'FULLYBUILT', ctrl.headers['X-Launchpad-Build-State'])
def test_generateEmail_with_null_fields(self):
@@ -119,6 +121,8 @@
'recipe-build-status',
ctrl.headers['X-Launchpad-Notification-Type'])
self.assertEqual(
+ '~archiveowner/ubuntu/ppa', ctrl.headers['X-Launchpad-Archive'])
+ self.assertEqual(
'SUPERSEDED', ctrl.headers['X-Launchpad-Build-State'])
def test_generateEmail_upload_failure(self):
Follow ups