← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wallyworld/launchpad/recipe-webservice-api into lp:launchpad

 

The proposal to merge lp:~wallyworld/launchpad/recipe-webservice-api into lp:launchpad has been updated.

Description changed to:

Simple change to export via the webservice some recipe apis to list builds and recipes. See bugs 712329 and 712331.

== Implementation ==

Initial review discussions indicated that the current methods getBuilds() and getPendingBuilds() were poorly named for exporting. So the following methods were introduced:

getBuilds() - new, returns all builds
getPendingBuilds() - unchanged, returns builds where status == needsbuild
getCompleteBuilds() - renamed from getBuilds(), returns builds where status != needsbuild

Add required decorators to the exported methods:
IHasRecipe.getRecipes()
ISourcePackageRecipe.getBuilds()
ISourcePackageRecipe.getCurrentBuilds()
ISourcePackageRecipe.getPendingBuilds()
ISourcePackageRecipe.getLastBuild()


An additional small change was made to the order by statement used by the queries. The secondary order by term, BuildFarmJob.id, was changed to Desc() so that the semantics match the order imposed by the start_date, create_date ordering ie later builds go first

== Tests ==

Add/modify tests in test_sourcepackagerecipe.TestWebservice
  test_getBuilds
  test_getRecipes
  test_requestBuild

bin/test -vvt test_sourcepackagerecipe.TestWebservice

== Lint ==
Linting changed files:
  lib/canonical/launchpad/interfaces/_schema_circular_imports.py
  lib/lp/code/interfaces/hasrecipes.py
  lib/lp/code/interfaces/sourcepackagerecipe.py
  lib/lp/code/model/tests/test_sourcepackagerecipe.py

./lib/canonical/launchpad/interfaces/_schema_circular_imports.py
     551: E501 line too long (82 characters)
     551: Line exceeds 78 characters.
./lib/lp/code/interfaces/hasrecipes.py
      21: E302 expected 2 blank lines, found 1
./lib/lp/code/interfaces/sourcepackagerecipe.py
     185: E501 line too long (83 characters)
     185: Line exceeds 78 characters.

For more details, see:
https://code.launchpad.net/~wallyworld/launchpad/recipe-webservice-api/+merge/50684
-- 
https://code.launchpad.net/~wallyworld/launchpad/recipe-webservice-api/+merge/50684
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wallyworld/launchpad/recipe-webservice-api into lp:launchpad.



References