Diff for "LEP/BuildFromBranchIntoArchive"

Not logged in - Log In / Register

Differences between revisions 1 and 2
Revision 1 as of 2011-06-16 10:20:49
Size: 4453
Editor: jelmer
Comment: add bfbia LEP
Revision 2 as of 2011-06-16 10:43:13
Size: 4453
Editor: jelmer
Comment: fix links
Deletions are marked like this. Additions are marked like this.
Line 18: Line 18:
This is also a milestone towards [[https://dev.launchpad.net/LEP/BuildFromBranchIntoArchive|BuildFromBranchIntoPrimary]]. This is also a milestone towards [[https://dev.launchpad.net/LEP/BuildFromBranchIntoPrimary|BuildFromBranchIntoPrimary]].
Line 22: Line 22:
The security implications are similar to those of recipes, which can also only be targeted at PPAs. Building from a branch into the primary archive is more complex but [[https://dev.launchpad.net/LEP/BuildFromBranchIntoArchive|beyond the scope of this LEP]]. The security implications are similar to those of recipes, which can also only be targeted at PPAs. Building from a branch into the primary archive is more complex but [[https://dev.launchpad.net/LEP/BuildFromBranchIntoPrimary|beyond the scope of this LEP]].
Line 44: Line 44:
 * Building into anything other than PPA's; see [[https://dev.launchpad.net/LEP/BuildFromBranchIntoArchive|BuildFromBranchIntoPrimary]]  * Building into anything other than PPA's; see [[https://dev.launchpad.net/LEP/BuildFromBranchIntoPrimary|BuildFromBranchIntoPrimary]]

Build from branch into archive

Short description of feature

Contact: JelmerVernooij, MartinPool
LEP: https://dev.launchpad.net/LEP/BuildFromBranchIntoArchive
On Launchpad: bfbia bugs

As a developer
I want Launchpad to build source and binary packages from branches
so that I don't have to build and dput source packages to PPAs manually

Rationale

At the moment building a source package from a revision in a branch on Launchpad requires creating a recipe. It would be useful to have a way to request a one-off build of a specific revision into a PPA.

This is also a milestone towards BuildFromBranchIntoPrimary.

Risks

The security implications are similar to those of recipes, which can also only be targeted at PPAs. Building from a branch into the primary archive is more complex but beyond the scope of this LEP.

Making it easier to request builds will also make it a lot easier to flood the build farm.

Stakeholders

  • ???

Must

  • Provide a way to build from a branch into a PPA without having to create a recipe
  • Expose this mechanism on the web UI
  • Expose this mechanism via the web service

Nice to have

  • lp-build-branch command in lptools that calls out to the web API. ("lp-build-branch lp:~debian-bazaar/bzr/unstable ppa:bzr/ppa")

Must not

Out of scope

Workflows

Publish a change into a PPA

  1. User makes a local branch from the source package branch.
  2. Make changes
  3. Commit
  4. Push back to a branch
  5. Request publication (through web UI or an API request)

Success

How will we know when we are done?

  • You can build from a branch directly into a PPA

How will we measure how well we have done?

Thoughts ?

  • Where should the API request live ? IBranch.requestBuild ?
  • Should we restrict the number of builds a user can request this way to prevent resource abuse? Perhaps limiting it to one active build per branch?

Changes needed

Most of these changes will be similar to what already exists for recipes. We probably want to factor out some bits to be shared between them.

  • SourcePackageBranchBuild class

  • New type of schedule-able job (SourcePackageBranchBuildJob) to request a source package be built from a branch. There is already a db enum for it, but we need to add a new build farm job type.

  • UI bits for showing branch build jobs
  • API request for requesting a build
  • extension in buildmaster to support running a SourcePackageBranchBuild

  • some lines in the archive uploader for handling branch builds
  • UI button on branch web pages for requesting a build (allowing you to specify a target PPA and a revision)
  • renaming of 'buildrecipe' script to 'buildsourcepackage' and extension or a new 'buildbranch' script
  • on the builder, support for building a new kind of job, with a revision_id and a branch as custom parameters

Implementation questions

  • Should we do this on top of recipes?
    • For the bzr-builder side of this, it's not necessary (bzr-builder can now directly build branches, without a recipe)
    • Using recipes as they currently exist may make the linkage between source package branch and built source package much looser.
    • It seems like locking the source package branch to the branch makes it easier to find the right source for a package, and easier to get the right access control.
    • We can generate manifests on demand from a SourcePackageBranchBuild if users need them, there's no need to store them in the database

  • SourcePackageRelease currently has a link to the SourcePackageRecipeBuild ("source_package_recipe_build") that built it. Should we just add a (non-required) "source_package_branch_build" field as well, or something more advanced that can point at either a SourcePackageRecipeBuild or a SourcePackageBranchBuild?

LEP/BuildFromBranchIntoArchive (last edited 2011-07-01 21:10:42 by mbp)