launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #20802
[Merge] lp:~cjwatson/launchpad/fix-snap-job-mailer-perms into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/fix-snap-job-mailer-perms into lp:launchpad.
Commit message:
Ensure that SnapStoreUploadJob has SELECT permissions on builder, since it needs that to send mail about snapbuilds with an assigned builder.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/fix-snap-job-mailer-perms/+merge/300103
Ensure that SnapStoreUploadJob has SELECT permissions on builder, since it needs that to send mail about snapbuilds with an assigned builder.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/fix-snap-job-mailer-perms into lp:launchpad.
=== modified file 'database/schema/security.cfg'
--- database/schema/security.cfg 2016-07-14 14:22:26 +0000
+++ database/schema/security.cfg 2016-07-14 16:11:59 +0000
@@ -2550,6 +2550,7 @@
type=user
groups=script
public.archive = SELECT
+public.builder = SELECT
public.distribution = SELECT
public.distroarchseries = SELECT
public.distroseries = SELECT
=== modified file 'lib/lp/snappy/tests/test_snapbuildjob.py'
--- lib/lp/snappy/tests/test_snapbuildjob.py 2016-06-21 14:51:06 +0000
+++ lib/lp/snappy/tests/test_snapbuildjob.py 2016-07-14 16:11:59 +0000
@@ -90,7 +90,8 @@
def test_run(self):
# The job uploads the build to the store and records the store URL.
- snapbuild = self.factory.makeSnapBuild()
+ snapbuild = self.factory.makeSnapBuild(
+ builder=self.factory.makeBuilder())
self.assertContentEqual([], snapbuild.store_upload_jobs)
job = SnapStoreUploadJob.create(snapbuild)
client = FakeSnapStoreClient()
@@ -108,7 +109,8 @@
def test_run_failed(self):
# A failed run sets the store upload status to FAILED.
- snapbuild = self.factory.makeSnapBuild()
+ snapbuild = self.factory.makeSnapBuild(
+ builder=self.factory.makeBuilder())
self.assertContentEqual([], snapbuild.store_upload_jobs)
job = SnapStoreUploadJob.create(snapbuild)
client = FakeSnapStoreClient()
@@ -127,7 +129,8 @@
# A run that gets 401 from the store sends mail.
requester = self.factory.makePerson(name="requester")
snapbuild = self.factory.makeSnapBuild(
- requester=requester, name="test-snap", owner=requester)
+ requester=requester, name="test-snap", owner=requester,
+ builder=self.factory.makeBuilder())
self.assertContentEqual([], snapbuild.store_upload_jobs)
job = SnapStoreUploadJob.create(snapbuild)
client = FakeSnapStoreClient()
@@ -167,7 +170,8 @@
# A run that finds that the store has not yet finished scanning the
# package schedules itself to be retried.
self.useFixture(FakeLogger())
- snapbuild = self.factory.makeSnapBuild()
+ snapbuild = self.factory.makeSnapBuild(
+ builder=self.factory.makeBuilder())
self.assertContentEqual([], snapbuild.store_upload_jobs)
job = SnapStoreUploadJob.create(snapbuild)
client = FakeSnapStoreClient()
@@ -205,7 +209,8 @@
# A run that gets a scan failure from the store sends mail.
requester = self.factory.makePerson(name="requester")
snapbuild = self.factory.makeSnapBuild(
- requester=requester, name="test-snap", owner=requester)
+ requester=requester, name="test-snap", owner=requester,
+ builder=self.factory.makeBuilder())
self.assertContentEqual([], snapbuild.store_upload_jobs)
job = SnapStoreUploadJob.create(snapbuild)
client = FakeSnapStoreClient()
Follow ups