launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #22485
Re: [Merge] lp:~cjwatson/launchpad/build-fast-cleanup into lp:launchpad
Diff comments:
>
> === modified file 'lib/lp/buildmaster/model/buildfarmjobbehaviour.py'
> --- lib/lp/buildmaster/model/buildfarmjobbehaviour.py 2016-10-12 14:02:19 +0000
> +++ lib/lp/buildmaster/model/buildfarmjobbehaviour.py 2018-05-02 13:37:24 +0000
> @@ -48,11 +49,39 @@
> self.build = build
> self._builder = None
>
> + @property
> + def distro_arch_series(self):
> + if self.build is not None:
> + return self.build.distro_arch_series
> + else:
> + return None
I agree that it's not needed on production, but without this verifyObject sometimes fails, which makes the tests a bit weird; so unless you have strong objections I'd rather keep this.
> +
> def setBuilder(self, builder, slave):
> """The builder should be set once and not changed."""
> self._builder = builder
> self._slave = slave
>
> + def determineFilesToSend(self):
> + """The default behaviour is to send no files."""
> + return {}
> +
> + def extraBuildArgs(self, logger=None):
> + """The default behaviour is to send only common extra arguments."""
> + args = {}
> + args["arch_tag"] = self.distro_arch_series.architecturetag
> + args["archive_private"] = self.build.archive.private
> + args["build_url"] = canonical_url(self.build)
> + args["fast_cleanup"] = self._builder.virtualized
> + args["series"] = self.distro_arch_series.distroseries.name
> + return args
> +
> + @defer.inlineCallbacks
> + def composeBuildRequest(self, logger):
> + args = yield self.extraBuildArgs(logger=logger)
> + defer.returnValue(
> + (self.builder_type, self.distro_arch_series,
> + self.determineFilesToSend(), args))
> +
> def verifyBuildRequest(self, logger):
> """The default behaviour is a no-op."""
> pass
--
https://code.launchpad.net/~cjwatson/launchpad/build-fast-cleanup/+merge/344958
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
References