launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #23203
[Merge] lp:~cjwatson/launchpad/pocket-chroot-really-pocket into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/pocket-chroot-really-pocket into lp:launchpad with lp:~cjwatson/launchpad/refactor-ttb-composeBuildRequest as a prerequisite.
Commit message:
Make PocketChroots actually be usefully per-pocket.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/pocket-chroot-really-pocket/+merge/361456
This lets us potentially have separate chroots for -updates and similar, speeding up builds.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/pocket-chroot-really-pocket into lp:launchpad.
=== modified file 'lib/lp/buildmaster/interfaces/buildfarmjobbehaviour.py'
--- lib/lp/buildmaster/interfaces/buildfarmjobbehaviour.py 2019-01-07 17:26:35 +0000
+++ lib/lp/buildmaster/interfaces/buildfarmjobbehaviour.py 2019-01-07 17:26:35 +0000
@@ -25,6 +25,8 @@
distro_arch_series = Attribute("The `DistroArchSeries` to build against.")
+ pocket = Attribute("The `PackagePublishingPocket` to build against.")
+
def setBuilder(builder, slave):
"""Sets the associated builder and slave for this instance."""
@@ -52,6 +54,7 @@
:param logger: A logger to be used to log diagnostic information.
:return: A tuple of (
"builder type", `DistroArchSeries` to build against,
+ `PackagePublishingPocket` to build against,
{filename: `sendFileToSlave` arguments}, {extra build arguments}),
or a Deferred resulting in the same.
"""
=== modified file 'lib/lp/buildmaster/model/buildfarmjobbehaviour.py'
--- lib/lp/buildmaster/model/buildfarmjobbehaviour.py 2019-01-07 17:26:35 +0000
+++ lib/lp/buildmaster/model/buildfarmjobbehaviour.py 2019-01-07 17:26:35 +0000
@@ -27,6 +27,7 @@
BuildDaemonError,
CannotBuild,
)
+from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.services.config import config
from lp.services.helpers import filenameToContentType
from lp.services.librarian.interfaces import ILibraryFileAliasSet
@@ -63,6 +64,13 @@
else:
return None
+ @property
+ def pocket(self):
+ if self.build is not None:
+ return self.build.pocket
+ else:
+ return PackagePublishingPocket.RELEASE
+
def setBuilder(self, builder, slave):
"""The builder should be set once and not changed."""
self._builder = builder
@@ -86,7 +94,7 @@
def composeBuildRequest(self, logger):
args = yield self.extraBuildArgs(logger=logger)
defer.returnValue(
- (self.builder_type, self.distro_arch_series,
+ (self.builder_type, self.distro_arch_series, self.pocket,
self.determineFilesToSend(), args))
def verifyBuildRequest(self, logger):
@@ -101,10 +109,11 @@
"Preparing job %s (%s) on %s."
% (cookie, self.build.title, self._builder.url))
- builder_type, das, files, args = yield self.composeBuildRequest(logger)
+ builder_type, das, pocket, files, args = yield (
+ self.composeBuildRequest(logger))
# First cache the chroot and any other files that the job needs.
- chroot = das.getChroot()
+ chroot = das.getChroot(pocket=pocket)
if chroot is None:
raise CannotBuild(
"Unable to find a chroot for %s" % das.displayname)
=== modified file 'lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py'
--- lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py 2018-06-09 08:51:54 +0000
+++ lib/lp/buildmaster/tests/test_buildfarmjobbehaviour.py 2019-01-07 17:26:35 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2018 Canonical Ltd. This software is licensed under the
+# Copyright 2010-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Unit tests for BuildFarmJobBehaviourBase."""
@@ -76,7 +76,7 @@
class FakeDistroArchSeries:
- def getChroot(self):
+ def getChroot(self, pocket=None):
return FakeLibraryFileAlias('chroot-fooix-bar-y86.tar.bz2')
@@ -150,7 +150,8 @@
slave = OkSlave()
logger = BufferLogger()
behaviour.composeBuildRequest = FakeMethod(
- ('foobuild', FakeDistroArchSeries(), files,
+ ('foobuild', FakeDistroArchSeries(),
+ PackagePublishingPocket.RELEASE, files,
{'some': 'arg', 'archives': ['http://admin:sekrit@blah/']}))
behaviour.setBuilder(builder, slave)
yield behaviour.dispatchBuildToSlave(logger)
=== modified file 'lib/lp/code/model/tests/test_recipebuilder.py'
--- lib/lp/code/model/tests/test_recipebuilder.py 2018-05-02 13:22:17 +0000
+++ lib/lp/code/model/tests/test_recipebuilder.py 2019-01-07 17:26:35 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2018 Canonical Ltd. This software is licensed under the
+# Copyright 2010-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Test RecipeBuildBehaviour."""
@@ -368,7 +368,8 @@
build_request = yield job.composeBuildRequest(None)
extra_args = yield job.extraBuildArgs()
self.assertEqual(
- ('sourcepackagerecipe', das, {}, extra_args), build_request)
+ ('sourcepackagerecipe', das, job.build.pocket, {}, extra_args),
+ build_request)
class TestBuildNotifications(TrialTestCase):
=== modified file 'lib/lp/snappy/model/snapbuildbehaviour.py'
--- lib/lp/snappy/model/snapbuildbehaviour.py 2018-08-30 16:15:20 +0000
+++ lib/lp/snappy/model/snapbuildbehaviour.py 2019-01-07 17:26:35 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015-2018 Canonical Ltd. This software is licensed under the
+# Copyright 2015-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""An `IBuildFarmJobBehaviour` for `SnapBuild`.
@@ -78,7 +78,7 @@
if build.archive.private and build.snap.owner != build.archive.owner:
raise SnapBuildArchiveOwnerMismatch()
- chroot = build.distro_arch_series.getChroot()
+ chroot = build.distro_arch_series.getChroot(pocket=build.pocket)
if chroot is None:
raise CannotBuild(
"Missing chroot for %s" % build.distro_arch_series.displayname)
=== modified file 'lib/lp/snappy/tests/test_snapbuildbehaviour.py'
--- lib/lp/snappy/tests/test_snapbuildbehaviour.py 2018-08-30 16:15:20 +0000
+++ lib/lp/snappy/tests/test_snapbuildbehaviour.py 2019-01-07 17:26:35 +0000
@@ -1,4 +1,4 @@
-# Copyright 2015-2018 Canonical Ltd. This software is licensed under the
+# Copyright 2015-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Test snap package build behaviour."""
@@ -329,8 +329,13 @@
lfa = self.factory.makeLibraryFileAlias(db_only=True)
job.build.distro_arch_series.addOrUpdateChroot(lfa)
build_request = yield job.composeBuildRequest(None)
- self.assertEqual(build_request[1], job.build.distro_arch_series)
- self.assertThat(build_request[3], IsInstance(dict))
+ self.assertThat(build_request, MatchesListwise([
+ Equals('snap'),
+ Equals(job.build.distro_arch_series),
+ Equals(job.build.pocket),
+ Equals({}),
+ IsInstance(dict),
+ ]))
@defer.inlineCallbacks
def test_requestProxyToken_unconfigured(self):
@@ -593,7 +598,7 @@
job = self.makeJob()
build_request = yield job.composeBuildRequest(None)
self.assertThat(
- build_request[3]["proxy_url"], self.getProxyURLMatcher(job))
+ build_request[4]["proxy_url"], self.getProxyURLMatcher(job))
@defer.inlineCallbacks
def test_composeBuildRequest_deleted(self):
=== modified file 'lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py'
--- lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py 2018-05-01 16:08:03 +0000
+++ lib/lp/soyuz/browser/tests/test_distroarchseries_webservice.py 2019-01-07 17:26:35 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2018 Canonical Ltd. This software is licensed under the
+# Copyright 2010-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
from __future__ import absolute_import, print_function, unicode_literals
@@ -13,12 +13,14 @@
)
from zope.security.management import endInteraction
+from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.services.features.testing import FeatureFixture
from lp.soyuz.interfaces.livefs import LIVEFS_FEATURE_FLAG
from lp.testing import (
api_url,
launchpadlib_for,
login_as,
+ person_logged_in,
TestCaseWithFactory,
ws_object,
)
@@ -123,6 +125,29 @@
ws_das.removeChroot()
self.assertIsNone(ws_das.chroot_url)
+ def test_setChroot_pocket(self):
+ das = self.factory.makeDistroArchSeries()
+ user = das.distroseries.distribution.main_archive.owner
+ webservice = launchpadlib_for("testing", user)
+ ws_das = ws_object(webservice, das)
+ sha1_1 = hashlib.sha1('abcxyz').hexdigest()
+ ws_das.setChroot(data='abcxyz', sha1sum=sha1_1)
+ sha1_2 = hashlib.sha1('123456').hexdigest()
+ ws_das.setChroot(data='123456', sha1sum=sha1_2, pocket='Updates')
+ release_chroot = das.getChroot(pocket=PackagePublishingPocket.RELEASE)
+ self.assertEqual(sha1_1, release_chroot.content.sha1)
+ updates_chroot = das.getChroot(pocket=PackagePublishingPocket.UPDATES)
+ self.assertEqual(sha1_2, updates_chroot.content.sha1)
+ with person_logged_in(user):
+ release_chroot_url = release_chroot.http_url
+ updates_chroot_url = updates_chroot.http_url
+ self.assertEqual(
+ release_chroot_url, ws_das.getChrootURL(pocket='Release'))
+ self.assertEqual(
+ updates_chroot_url, ws_das.getChrootURL(pocket='Updates'))
+ self.assertEqual(
+ updates_chroot_url, ws_das.getChrootURL(pocket='Proposed'))
+
def test_setChrootFromBuild(self):
self.useFixture(FeatureFixture({LIVEFS_FEATURE_FLAG: "on"}))
das = self.factory.makeDistroArchSeries()
=== modified file 'lib/lp/soyuz/doc/pocketchroot.txt'
--- lib/lp/soyuz/doc/pocketchroot.txt 2018-05-27 18:32:33 +0000
+++ lib/lp/soyuz/doc/pocketchroot.txt 2019-01-07 17:26:35 +0000
@@ -24,7 +24,7 @@
Check if getPocketChroot returns None for unknown chroots:
- >>> p_chroot = hoary_i386.getPocketChroot()
+ >>> p_chroot = hoary_i386.getPocketChroot(PackagePublishingPocket.RELEASE)
>>> print(p_chroot)
None
@@ -39,6 +39,8 @@
>>> p_chroot1 = hoary_i386.addOrUpdateChroot(chroot=chroot1)
>>> print(p_chroot1.distroarchseries.architecturetag)
i386
+ >>> print(p_chroot1.pocket.name)
+ RELEASE
>>> print(p_chroot1.chroot.id)
1
@@ -48,6 +50,8 @@
>>> p_chroot2 = hoary_i386.addOrUpdateChroot(chroot=chroot2)
>>> print(p_chroot2.distroarchseries.architecturetag)
i386
+ >>> print(p_chroot2.pocket.name)
+ RELEASE
>>> print(p_chroot2.chroot.id)
2
>>> p_chroot2 == p_chroot1
@@ -55,7 +59,7 @@
Ensure chroot was updated by retriving it from DB again:
- >>> hoary_i386.getPocketChroot().chroot.id
+ >>> hoary_i386.getPocketChroot(PackagePublishingPocket.RELEASE).chroot.id
2
Check if getChroot returns the correspondent Chroot LFA instance for
@@ -65,8 +69,33 @@
>>> chroot.id
2
+PocketChroots can also (per the name) be set for specific pockets:
+
+ >>> chroot3 = getUtility(ILibraryFileAliasSet)[3]
+ >>> p_chroot3 = hoary_i386.addOrUpdateChroot(
+ ... chroot=chroot3, pocket=PackagePublishingPocket.UPDATES)
+ >>> print(p_chroot3.distroarchseries.architecturetag)
+ i386
+ >>> print(p_chroot3.pocket.name)
+ UPDATES
+ >>> print(p_chroot3.chroot.id)
+ 3
+ >>> hoary_i386.getPocketChroot(PackagePublishingPocket.UPDATES).chroot.id
+ 3
+ >>> hoary_i386.getChroot(pocket=PackagePublishingPocket.UPDATES).id
+ 3
+
+getPocketChroot falls back to depended-on pockets if necessary:
+
+ >>> hoary_i386.getPocketChroot(PackagePublishingPocket.SECURITY).chroot.id
+ 2
+ >>> print(hoary_i386.getPocketChroot(
+ ... PackagePublishingPocket.SECURITY, exact_pocket=True))
+ None
+ >>> hoary_i386.getChroot(pocket=PackagePublishingPocket.SECURITY).id
+ 2
+
Force transaction commit in order to test DB constraints:
>>> import transaction
>>> transaction.commit()
-
=== modified file 'lib/lp/soyuz/interfaces/distroarchseries.py'
--- lib/lp/soyuz/interfaces/distroarchseries.py 2018-05-01 16:08:03 +0000
+++ lib/lp/soyuz/interfaces/distroarchseries.py 2019-01-07 17:26:35 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Distribution architecture series interfaces."""
@@ -16,6 +16,7 @@
from lazr.restful.declarations import (
error_status,
export_as_webservice_entry,
+ export_read_operation,
export_write_operation,
exported,
operation_for_version,
@@ -32,6 +33,7 @@
from zope.schema import (
Bool,
Bytes,
+ Choice,
Int,
Text,
TextLine,
@@ -42,6 +44,7 @@
from lp.buildmaster.interfaces.processor import IProcessor
from lp.registry.interfaces.distroseries import IDistroSeries
from lp.registry.interfaces.person import IPerson
+from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.registry.interfaces.role import IHasOwner
from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
@@ -149,17 +152,31 @@
"""Update the cached binary package count for this distro arch
series.
"""
- def getPocketChroot():
+
+ def getPocketChroot(pocket, exact_pocket=False):
"""Return the PocketChroot for this distroarchseries and given pocket.
+
+ If exact_pocket is False, this follows pocket dependencies and finds
+ the chroot for the closest pocket that exists: for example, if no
+ chroot exists for SECURITY, then it will choose the one for RELEASE.
+ If exact_pocket is True, this only finds chroots for exactly the
+ given pocket.
"""
- def getChroot(default=None):
- """Return the Chroot for this distroarchseries.
+ def getChroot(default=None, pocket=None):
+ """Return the Chroot for this distroarchseries and pocket.
It uses getPocketChroot and if not found returns 'default'.
"""
- def addOrUpdateChroot(pocket, chroot):
+ @operation_parameters(
+ pocket=Choice(vocabulary=PackagePublishingPocket, required=False))
+ @export_read_operation()
+ @operation_for_version("devel")
+ def getChrootURL(pocket=None):
+ """Return the chroot URL for this distroarchseries and pocket."""
+
+ def addOrUpdateChroot(chroot, pocket=None):
"""Return the just added or modified PocketChroot."""
def searchBinaryPackages(text):
@@ -177,10 +194,12 @@
class IDistroArchSeriesModerate(Interface):
- @operation_parameters(data=Bytes(), sha1sum=Text())
+ @operation_parameters(
+ data=Bytes(), sha1sum=Text(),
+ pocket=Choice(vocabulary=PackagePublishingPocket, required=False))
@export_write_operation()
@operation_for_version("devel")
- def setChroot(data, sha1sum):
+ def setChroot(data, sha1sum, pocket=None):
"""Set the chroot tarball used for builds in this architecture.
The SHA-1 checksum must match the chroot file.
@@ -196,9 +215,11 @@
def setChrootFromBuild(livefsbuild, filename):
"""Set the chroot tarball from a live filesystem build."""
+ @operation_parameters(
+ pocket=Choice(vocabulary=PackagePublishingPocket, required=False))
@export_write_operation()
@operation_for_version("devel")
- def removeChroot():
+ def removeChroot(pocket=None):
"""Remove the chroot tarball used for builds in this architecture."""
=== modified file 'lib/lp/soyuz/model/binarypackagebuildbehaviour.py'
--- lib/lp/soyuz/model/binarypackagebuildbehaviour.py 2018-05-02 12:45:12 +0000
+++ lib/lp/soyuz/model/binarypackagebuildbehaviour.py 2019-01-07 17:26:35 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Builder behaviour for binary package builds."""
@@ -110,7 +110,7 @@
"Soyuz is not yet capable of building SECURITY uploads.")
# Ensure build has the needed chroot
- chroot = build.distro_arch_series.getChroot()
+ chroot = build.distro_arch_series.getChroot(pocket=build.pocket)
if chroot is None:
raise CannotBuild(
"Missing CHROOT for %s/%s/%s" % (
=== modified file 'lib/lp/soyuz/model/distroarchseries.py'
--- lib/lp/soyuz/model/distroarchseries.py 2018-05-01 16:08:03 +0000
+++ lib/lp/soyuz/model/distroarchseries.py 2019-01-07 17:26:35 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2018 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
__metaclass__ = type
@@ -47,6 +47,7 @@
from lp.services.webapp.publisher import (
get_raw_form_value_from_current_request,
)
+from lp.soyuz.adapters.archivedependencies import pocket_dependencies
from lp.soyuz.enums import PackagePublishingStatus
from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
from lp.soyuz.interfaces.binarypackagename import IBinaryPackageName
@@ -127,40 +128,58 @@
return (self.distroseries.nominatedarchindep is not None and
self.id == self.distroseries.nominatedarchindep.id)
- def getPocketChroot(self):
+ def getPocketChroot(self, pocket, exact_pocket=False):
"""See `IDistroArchSeries`."""
- pchroot = PocketChroot.selectOneBy(distroarchseries=self)
- return pchroot
+ pockets = [pocket] if exact_pocket else pocket_dependencies[pocket]
+ pocket_chroots = {
+ pocket_chroot.pocket: pocket_chroot
+ for pocket_chroot in IStore(PocketChroot).find(
+ PocketChroot,
+ PocketChroot.distroarchseries == self,
+ PocketChroot.pocket.is_in(pockets))}
+ for pocket_dep in reversed(pockets):
+ if pocket_dep in pocket_chroots:
+ return pocket_chroots[pocket_dep]
+ return None
- def getChroot(self, default=None):
+ def getChroot(self, default=None, pocket=None):
"""See `IDistroArchSeries`."""
- pocket_chroot = self.getPocketChroot()
+ if pocket is None:
+ pocket = PackagePublishingPocket.RELEASE
+ pocket_chroot = self.getPocketChroot(pocket)
if pocket_chroot is None:
return default
return pocket_chroot.chroot
- @property
- def chroot_url(self):
+ def getChrootURL(self, pocket=None):
"""See `IDistroArchSeries`."""
- chroot = self.getChroot()
+ chroot = self.getChroot(pocket=pocket)
if chroot is None:
return None
return chroot.http_url
- def addOrUpdateChroot(self, chroot):
- """See `IDistroArchSeries`."""
- pocket_chroot = self.getPocketChroot()
+ @property
+ def chroot_url(self):
+ """See `IDistroArchSeries`."""
+ return self.getChrootURL()
+
+ def addOrUpdateChroot(self, chroot, pocket=None):
+ """See `IDistroArchSeries`."""
+ if pocket is None:
+ pocket = PackagePublishingPocket.RELEASE
+ pocket_chroot = self.getPocketChroot(pocket, exact_pocket=True)
if pocket_chroot is None:
- return PocketChroot(distroarchseries=self, chroot=chroot)
+ return PocketChroot(
+ distroarchseries=self, pocket=pocket, chroot=chroot)
else:
pocket_chroot.chroot = chroot
return pocket_chroot
- def setChroot(self, data, sha1sum):
+ def setChroot(self, data, sha1sum, pocket=None):
"""See `IDistroArchSeries`."""
# XXX: StevenK 2013-06-06 bug=1116954: We should not need to refetch
# the file content from the request, since the passed in one has been
@@ -192,15 +211,15 @@
contentType='application/octet-stream')
if lfa.content.sha1 != sha1sum:
raise InvalidChrootUploaded("Chroot upload checksums do not match")
- self.addOrUpdateChroot(lfa)
+ self.addOrUpdateChroot(lfa, pocket=pocket)
def setChrootFromBuild(self, livefsbuild, filename):
"""See `IDistroArchSeries`."""
self.addOrUpdateChroot(livefsbuild.getFileByName(filename))
- def removeChroot(self):
+ def removeChroot(self, pocket=None):
"""See `IDistroArchSeries`."""
- self.addOrUpdateChroot(None)
+ self.addOrUpdateChroot(None, pocket=pocket)
def searchBinaryPackages(self, text):
"""See `IDistroArchSeries`."""
=== modified file 'lib/lp/soyuz/model/livefsbuildbehaviour.py'
--- lib/lp/soyuz/model/livefsbuildbehaviour.py 2018-05-09 17:21:53 +0000
+++ lib/lp/soyuz/model/livefsbuildbehaviour.py 2019-01-07 17:26:35 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2018 Canonical Ltd. This software is licensed under the
+# Copyright 2014-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""An `IBuildFarmJobBehaviour` for `LiveFSBuild`.
@@ -71,7 +71,7 @@
if build.archive.private and build.livefs.owner != build.archive.owner:
raise LiveFSBuildArchiveOwnerMismatch()
- chroot = build.distro_arch_series.getChroot()
+ chroot = build.distro_arch_series.getChroot(pocket=build.pocket)
if chroot is None:
raise CannotBuild(
"Missing chroot for %s" % build.distro_arch_series.displayname)
=== modified file 'lib/lp/soyuz/tests/test_livefsbuildbehaviour.py'
--- lib/lp/soyuz/tests/test_livefsbuildbehaviour.py 2018-05-09 17:21:53 +0000
+++ lib/lp/soyuz/tests/test_livefsbuildbehaviour.py 2019-01-07 17:26:35 +0000
@@ -1,4 +1,4 @@
-# Copyright 2014-2018 Canonical Ltd. This software is licensed under the
+# Copyright 2014-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Test live filesystem build behaviour."""
@@ -272,7 +272,9 @@
build_request = yield job.composeBuildRequest(None)
args = yield job.extraBuildArgs()
self.assertEqual(
- ('livefs', job.build.distro_arch_series, {}, args), build_request)
+ ('livefs', job.build.distro_arch_series, job.build.pocket, {},
+ args),
+ build_request)
class MakeLiveFSBuildMixin:
=== modified file 'lib/lp/translations/model/translationtemplatesbuildbehaviour.py'
--- lib/lp/translations/model/translationtemplatesbuildbehaviour.py 2019-01-07 17:26:35 +0000
+++ lib/lp/translations/model/translationtemplatesbuildbehaviour.py 2019-01-07 17:26:35 +0000
@@ -28,6 +28,7 @@
from lp.buildmaster.model.buildfarmjobbehaviour import (
BuildFarmJobBehaviourBase,
)
+from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.registry.interfaces.productseries import IProductSeriesSet
from lp.translations.interfaces.translationimportqueue import (
ITranslationImportQueue,
@@ -64,6 +65,10 @@
ubuntu = getUtility(ILaunchpadCelebrities).ubuntu
return ubuntu.currentseries.nominatedarchindep
+ @property
+ def pocket(self):
+ return PackagePublishingPocket.RELEASE
+
def extraBuildArgs(self, logger=None):
args = super(TranslationTemplatesBuildBehaviour, self).extraBuildArgs(
logger=logger)
=== modified file 'lib/lp/translations/tests/test_translationtemplatesbuildbehaviour.py'
--- lib/lp/translations/tests/test_translationtemplatesbuildbehaviour.py 2019-01-07 17:26:35 +0000
+++ lib/lp/translations/tests/test_translationtemplatesbuildbehaviour.py 2019-01-07 17:26:35 +0000
@@ -22,6 +22,7 @@
SlaveTestHelpers,
WaitingSlave,
)
+from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.services.config import config
from lp.services.librarian.utils import copy_and_close
from lp.services.webapp import canonical_url
@@ -105,7 +106,8 @@
build_request = yield behaviour.composeBuildRequest(None)
das = behaviour.distro_arch_series
self.assertEqual(
- ('translation-templates', das, {}, {
+ ('translation-templates', das, PackagePublishingPocket.RELEASE, {},
+ {
'arch_tag': das.architecturetag,
'archive_private': False,
'branch_url': behaviour.build.branch.composePublicURL(),
Follow ups