Merge lp://staging/~abentley/launchpad/daily-builds-api into lp://staging/launchpad

Proposed by Aaron Bentley
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: Aaron Bentley
Merged at revision: not available
Proposed branch: lp://staging/~abentley/launchpad/daily-builds-api
Merge into: lp://staging/launchpad
Prerequisite: lp://staging/~abentley/launchpad/daily-builds-ui
Diff against target: 118 lines (+22/-8)
5 files modified
lib/canonical/launchpad/interfaces/_schema_circular_imports.py (+2/-0)
lib/lp/code/interfaces/sourcepackagerecipe.py (+4/-4)
lib/lp/code/model/tests/test_sourcepackagerecipe.py (+6/-1)
lib/lp/registry/interfaces/person.py (+7/-1)
lib/lp/registry/model/person.py (+3/-2)
To merge this branch: bzr merge lp://staging/~abentley/launchpad/daily-builds-api
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) code Approve
Review via email: mp+26335@code.staging.launchpad.net

Commit message

Implement API for daily builds.

Description of the change

= Summary =
Fix bug #586954: Launchpad should provide daily builds over API

== Proposed fix ==
Expose build_daily and daily_build_archive when creating recipes and as member
variables.

== Pre-implementation notes ==
None

== Implementation details ==
None

== Tests ==
bin/test -v test_sourcepackagerecipe

== Demo and Q/A ==
Write a script using the LP API. Have it create a recipe, specifying
build_daily and daily_build_archive.

Access the build_daily and daily_build_archive member variables.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  cronscripts/request_daily_builds.py
  lib/lp/code/model/tests/test_sourcepackagerecipebuild.py
  lib/lp/code/interfaces/sourcepackagerecipebuild.py
  lib/lp/code/configure.zcml
  lib/canonical/config/schema-lazr.conf
  lib/lp/soyuz/model/publishing.py
  lib/lp/code/scripts/tests/test_request_daily_builds.py
  database/schema/security.cfg
  lib/lp/soyuz/doc/buildd-slavescanner.txt
  lib/lp/soyuz/stories/soyuz/xx-build-record.txt
  lib/lp/code/model/tests/test_sourcepackagerecipe.py
  lib/lp/testing/factory.py
  lib/lp/code/model/sourcepackagerecipebuild.py
  lib/lp/code/templates/sourcepackagerecipe-index.pt
  lib/lp/buildmaster/model/buildqueue.py
  lib/lp/soyuz/doc/buildd-dispatching.txt
  lib/lp/registry/interfaces/person.py
  lib/lp/code/browser/sourcepackagerecipe.py
  lib/lp/code/model/sourcepackagerecipe.py
  lib/lp/code/browser/tests/test_sourcepackagerecipe.py
  configs/testrunner/launchpad-lazr.conf
  lib/lp/code/interfaces/sourcepackagerecipe.py
  lib/lp/registry/model/person.py
  lib/lp/soyuz/doc/build.txt
  lib/canonical/launchpad/interfaces/_schema_circular_imports.py

== Pyflakes Doctest notices ==

lib/lp/soyuz/doc/buildd-slavescanner.txt
    689: local variable 'pub_binaries' is assigned to but never used

== Pyflakes notices ==

cronscripts/request_daily_builds.py
    19: 'canonical' imported but unused

== Pylint notices ==

cronscripts/request_daily_builds.py
    19: [W0611] Unused import canonical

lib/lp/code/model/sourcepackagerecipebuild.py
    207: [W0702, SourcePackageRecipeBuild.makeDailyBuilds] No exception type(s) specified

lib/lp/registry/interfaces/person.py
    850: [C0322, IPersonPublic.createRecipe] Operator not preceded by a space
    distroseries=List(value_type=Reference(schema=Interface)),
    ^
    name=TextLine(),
    recipe_text=Text(),
    sourcepackagename=TextLine(),
    daily_build_archive=Reference(schema=Interface),
    build_daily=Bool(),
    )
    @export_factory_operation(Interface, [])
    def createRecipe(name, description, recipe_text, distroseries,
    sourcepackagename, registrant, daily_build_archive=None,
    build_daily=False):
    1414: [C0322, IPersonEditRestricted.addMember] Operator not preceded by a space
    status=copy_field(ITeamMembership['status']),
    ^
    comment=Text(required=False))
    @export_write_operation()
    def addMember(person, reviewer, status=TeamMembershipStatus.APPROVED,
    comment=None, force_team_add=False,
    may_subscribe_to_list=True):
    1455: [C0322, IPersonEditRestricted.acceptInvitationToBeMemberOf] Operator not preceded by a space
    comment=Text())
    ^
    @export_write_operation()
    def acceptInvitationToBeMemberOf(team, comment):
    1467: [C0322, IPersonEditRestricted.declineInvitationToBeMemberOf] Operator not preceded by a space
    comment=Text())
    ^
    @export_write_operation()
    def declineInvitationToBeMemberOf(team, comment):
    1764: [C0322, IPersonSet.newTeam] Operator not preceded by a space
    defaultmembershipperiod='default_membership_period',
    ^
    defaultrenewalperiod='default_renewal_period')
    @operation_parameters(
    subscriptionpolicy=Choice(
    title=_('Subscription policy'), vocabulary=TeamSubscriptionPolicy,
    required=False, default=TeamSubscriptionPolicy.MODERATED))
    @export_factory_operation(
    ITeam, ['name', 'displayname', 'teamdescription',
    'defaultmembershipperiod', 'defaultrenewalperiod'])
    def newTeam(teamowner, name, displayname, teamdescription=None,
    subscriptionpolicy=TeamSubscriptionPolicy.MODERATED,
    defaultmembershipperiod=None, defaultrenewalperiod=None):
    1833: [C0322, IPersonSet.findPerson] Operator not preceded by a space
    created_after=Datetime(
    ^
    title=_("Created after"), required=False),
    created_before=Datetime(
    title=_("Created before"), required=False),
    )
    @operation_returns_collection_of(IPerson)
    @export_read_operation()
    def findPerson(text="", exclude_inactive_accounts=True,
    must_have_email=False,
    created_after=None, created_before=None):

lib/lp/code/interfaces/sourcepackagerecipe.py
    150: [C0322, ISourcePackageRecipe.requestBuild] Operator not preceded by a space
    distroseries=Reference(schema=IDistroSeries),
    ^
    )
    @export_write_operation()
    def requestBuild(archive, distroseries, requester, pocket):

lib/lp/registry/model/person.py
    1265: [W0104, Person.addMember] Statement seems to have no effect

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

+ :param daily_build_archive: The archive to user for daily builds.
^^ You probably mean s/user/use/ here?

The newline on line 81 of your diff seems unnecessary.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

See my previous comment, it'd be nice if you could fix those two minor issues before landing.

review: Approve (code)
Revision history for this message
Aaron Bentley (abentley) wrote :

I have already fixed those issues. See diff.

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.