Merge lp:~abentley/launchpad/daily-build-freshness into lp:launchpad/db-devel
| Status: | Merged |
|---|---|
| Merged at revision: | 9422 |
| Proposed branch: | lp:~abentley/launchpad/daily-build-freshness |
| Merge into: | lp:launchpad/db-devel |
| Diff against target: |
39 lines (+15/-0) 2 files modified
database/schema/comments.sql (+2/-0) database/schema/patch-2207-61-0.sql (+13/-0) |
| To merge this branch: | bzr merge lp:~abentley/launchpad/daily-build-freshness |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Stuart Bishop | db | 2010-05-27 | Approve on 2010-06-03 |
| Björn Tillenius (community) | db | 2010-05-27 | Approve on 2010-05-31 |
| Jelmer Vernooij | code | 2010-05-27 | Pending |
|
Review via email:
|
|||
Commit Message
Store build manifests and flag stale recipes.
Description of the Change
= Summary =
Provide supplementary data for daily builds.
== Proposed fix ==
Provide SourcePackageRe
rebuilt for daily builds.
Provide SourcePackageRe
can then be fed into bzr-builder's --if-changed-from option in order to avoid
unnecessary rebuilds.
== Pre-implementation notes ==
Preimplementation was with Thumper.
== Implementation details ==
None
== Tests ==
None
== Demo and Q/A ==
None
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files:
database/
database/
database/
database/
| Aaron Bentley (abentley) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/28/2010 09:37 AM, Björn Tillenius wrote:
> Review: Needs Information db
> In general, the patch looks fine, but could you please expand on how the attributes will be set and used?
SourcePackageRe
=======
When the Branch scanner sees a that the branch tip has changed for a
given branch, it will find all recipes which involve that branch, and
set is_stale to True for all of them.
When the daily builds script runs, it will look for recipes with
is_stale True and build_daily True. It will request builds for them.
Then it will set is_stale False for them.
SourcePackageRe
=======
When RecipeBuildBeha
for the last successful build of that type (same recipe and
distroseries) and include that build's manifest with its extra build
args. (Manifests are a form of recipe, so converting a manifest to text
is something we already do.)
The recipe building code in our buildd will be modified to use the
manifest if supplied.
When the build completes, the output manifest is (already) supplied to
RecipeBuildBeha
SourcePackageRe
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkv
jeoAn0YCgJQUUM8
=5NhT
-----END PGP SIGNATURE-----
| Björn Tillenius (bjornt) wrote : | # |
On Fri, May 28, 2010 at 02:34:29PM -0000, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 05/28/2010 09:37 AM, Björn Tillenius wrote:
> > Review: Needs Information db
> > In general, the patch looks fine, but could you please expand on how the attributes will be set and used?
>
> SourcePackageRe
> =======
>
> When the Branch scanner sees a that the branch tip has changed for a
> given branch, it will find all recipes which involve that branch, and
> set is_stale to True for all of them.
>
> When the daily builds script runs, it will look for recipes with
> is_stale True and build_daily True. It will request builds for them.
> Then it will set is_stale False for them.
Ok, thanks for the information. I have one comment, though. For the sake
of correctness, it seems like is_stale shouldn't be set after the build
has been requested, but rather after the build has completed.
BTW, did you consider any other approaches? For example, keeping track
of which revision a build was for, and instead of finding all
is_stale=True recipes, find the recipes where the revision of the latest
build for a recipe is different from the latest revision in that branch?
Will your suggested approach have any effect on branch scanner
performance?
--
Björn Tillenius | https:/
| Aaron Bentley (abentley) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/31/2010 11:00 AM, Björn Tillenius wrote:
> Ok, thanks for the information. I have one comment, though. For the sake
> of correctness, it seems like is_stale shouldn't be set after the build
> has been requested, but rather after the build has completed.
There is no single build to refer to. A recipe may be built for many
distroseries. Even if there were a single build, it can become outdated
if a branch tip changes while it is building. But we don't know which
revisions it used to perform its build until the build is complete.
Also, if for some reason the build doesn't start in 24 hours, leaving
is_stale set to True would cause duplicate builds to be requested.
It seems to me that attempting to track the staleness of a recipe with
great precision makes us sensitive to race conditions and is not worth
the complexity. Instead, we should accept that we will occasionally
request duplicate builds, and handle that situation gracefully using
manifests as I described. Even without daily builds, it's easy for
users to accidentally request duplicate builds.
> BTW, did you consider any other approaches? For example, keeping track
> of which revision a build was for, and instead of finding all
> is_stale=True recipes, find the recipes where the revision of the latest
> build for a recipe is different from the latest revision in that branch?
Yes, I proposed something like that to thumper, and he proposed this
solution as a much simpler alternative.
Bear in mind that builds are one per distroseries, and that several
branches are involved in a recipe, and changing the tip of any of them
should trigger a build.
> Will your suggested approach have any effect on branch scanner
> performance?
I don't anticipate any observable difference. The DB queries should be
quite straightforward.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkw
MGoAn0k6pJzGmS1
=mtJA
-----END PGP SIGNATURE-----
| Stuart Bishop (stub) wrote : | # |
Generally fine.
I think we want some indexes:
CREATE INDEX sourcepackagere
ON SourcepackageRe
CREATE INDEX sourcepackagere
patch-2207-61-0.sql

In general, the patch looks fine, but could you please expand on how the attributes will be set and used?