Merge lp://qastaging/~abentley/launchpad/fix-builder-history into lp://qastaging/launchpad/db-devel

Proposed by Aaron Bentley
Status: Merged
Merged at revision: 9643
Proposed branch: lp://qastaging/~abentley/launchpad/fix-builder-history
Merge into: lp://qastaging/launchpad/db-devel
Diff against target: 126 lines (+44/-6)
6 files modified
lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py (+14/-1)
lib/lp/code/configure.zcml (+6/-1)
lib/lp/code/model/sourcepackagerecipebuild.py (+10/-0)
lib/lp/code/model/tests/test_sourcepackagerecipebuild.py (+8/-0)
lib/lp/soyuz/browser/build.py (+5/-3)
lib/lp/soyuz/model/binarypackagebuild.py (+1/-1)
To merge this branch: bzr merge lp://qastaging/~abentley/launchpad/fix-builder-history
Reviewer Review Type Date Requested Status
Julian Edwards (community) release-critical Approve
Paul Hummer (community) code Approve
Review via email: mp+32150@code.qastaging.launchpad.net

Commit message

Fix builder history with recipe builds

Description of the change

= Summary =
Fix bug #615562: sourcepackagerecipebuilds break branch history page

== Proposed fix ==
Provide an adaptor from lp.buildmaster.interfaces.buildfarmjob.IBuildFarmJob to
lp.buildmaster.interfaces.buildfarmjob.ISpecificBuildFarmJob that converts it
to returns a SourcePackageRecipeBuild.

== Pre-implementation notes ==
Discussed with bigjools

== Implementation details ==
Implemented get_recipe_build_for_build_farm_job as the adaptor.

Stopped returning CompleteBuild for non-BinaryPackageBuilds, because this
causes the wrong URL to be used.

Switched from In(BinaryPackageBuild.id, build_ids) to
BinaryPackageBuild.id.is_in(build_ids) because "In" was generating invalid SQL
when build_ids was empty.

== Tests ==
bin/test -t test_getSpecificJob -t test_builder_history

== Demo and Q/A ==
Create a SourcePackageRecipeBuild. After it has been built, look at its
builder's history page. The build should be listed, and should have the
correct URL.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/code/model/tests/test_sourcepackagerecipebuild.py
  lib/lp/code/configure.zcml
  lib/lp/soyuz/browser/build.py
  lib/lp/code/model/sourcepackagerecipebuild.py
  lib/lp/code/browser/tests/test_sourcepackagerecipebuild.py
  lib/lp/soyuz/model/binarypackagebuild.py

./lib/lp/soyuz/browser/build.py
      40: 'IHasBuildRecords' imported but unused
     297: E301 expected 1 blank line, found 0
     499: E202 whitespace before ')'
./lib/lp/code/model/sourcepackagerecipebuild.py
      50: E231 missing whitespace after ','
./lib/lp/soyuz/model/binarypackagebuild.py
     376: E202 whitespace before '}'
     447: W602 deprecated form of raising exception
     451: E231 missing whitespace after ','
     481: E501 line too long (83 characters)
     557: E203 whitespace before ':'
     671: E203 whitespace before ':'
     749: E202 whitespace before ')'
     907: E202 whitespace before ']'
     481: Line exceeds 78 characters.
     813: Line exceeds 78 characters.

To post a comment you must log in.
Revision history for this message
Paul Hummer (rockstar) wrote :

Land it!

review: Approve (code)
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Thanks for the fix!

review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: