Diff for "Soyuz/QA"

Not logged in - Log In / Register

Differences between revisions 8 and 9
Revision 8 as of 2020-09-24 10:22:41
Size: 2906
Editor: twom
Comment:
Revision 9 as of 2020-09-24 13:24:27
Size: 6033
Editor: twom
Comment:
Deletions are marked like this. Additions are marked like this.
Line 48: Line 48:

== Package Builds ==

On a new release of [[https://launchpad.net/launchpad-buildd|launchpad-buildd]] or soyuz code involved in building any of the various types, it is important to test that the builds succeed.

=== Translation Templates ===

You probably want:
 * [[https://dev.launchpad.net/Translations/GenerateTemplatesOnTestServers|TranslationTemplates on Test Servers|]]
 * [[https://dev.launchpad.net/Translations/GenerateTemplatesOnLocalBuildFarm| TranslationTemplates on Local Build Farm]]

=== Source Package Recipe Build ===

There is a full [[https://help.launchpad.net/Packaging/SourceBuilds/GettingStarted|Procedure] for creating a recipe and uploading it to launchpad.

A shorter way is to use an existing project on dogfood and create a new recipe (or build an existing one). [[https://code.dogfood.paddev.net/~canonical-launchpad-branches/launchpad-buildd/+git/launchpad-buildd|launchpad-buildd]] is a good candidate.

 1. Create a recipe
 2. Either 'Use an existing PPA' if you have one, or create a new one.
 3. Bionic and Xenial are a good choice for distribution series
 4. Request a build

A Source Package Recipe Build that builds into a PPA will also cause a Binary Package Build to happen, but it is still worth testing that separately.

=== Binary Package Build ===

These are created on the upload of a package for building into a PPA.

 1. [[https://dogfood.paddev.net/~/+activate-ppa|Create a PPA]]. This can be skipped if you've already done this.
 2. Follow the [[Soyuz/ReUploadPackage]] instructions. `sl` is a good candidate package.

A Source Package Recipe Build will also cause these builds to happen.

=== OCI Image Build ===

These build OCI ('docker') images, they are closely related to the snap package builds, but different enough to need separate testing. They require a git repository with an appropriate Dockerfile to already exist. [[https://code.dogfood.paddev.net/~twom/+git/test-docker-repo/|This can be used]].

 1. Create an OCI project under a distribution that supports OCI. [[https://dogfood.paddev.net/ubuntu/+oci/twom-test-recipe-for-documentation|This is a good candidate]].
 2. Create a recipe for this OCI Project, using 'Create OCI recipe'
 3. Fill in the details of the recipe and the source git repository. Any architecture that has docker in the archive should work.
 4. You can add a push rule / credentials once the recipe is created, if you need to test the OCI image being pushed to a registry.
 5. Request a build of this recipe.

=== Snap Build ===

Snap builds require a git branch to build from. It is slightly awkward to arrange for dogfood to do this, as it has no turnip or similar. Fortunately, snaps support building from external repositories, which can be either production launchpad (launchpad.net), github, or similar service.

 1. Create a snap on dogfood via `lp-shell`: `lp.snaps.new(name='test-from-api', owner=lp.me, git_repository_url='url-to-repository', git_path='branch-to-build')
 2. Find the snap via the [[https://dogfood.paddev.net/~/+snaps|Web UI]]
 3. Request a build of the snap

QA on Soyuz

(See also the Effective QA section in BuildFarm - you must visit this if you made changes in the publisher because builders need to access the archives)

There are three places you can do QA for Soyuz:

  • dogfood
  • [qa]staging
  • staging

QA on qastaging

qastaging only runs the UI side of Soyuz services, so you can only test code that runs in the webapp:

  • PPA copying operations
  • API operations
  • template/browser code changes
  • (add more here)

QA on staging

staging does not currently run any builders (references to 'clementine' are outdated). Similar QA to qastaging can be performed here. If building QA is absolutely required here, it could theoretically have scalingstack access, but that is not set up.

QA on dogfood

Dogfood is the original QA platform for Soyuz and some developers have shell access which is necessary to run the scripts and work with production-like data. Since this machine is not open for general access to developers, anyone wishing to QA changes to the following things will need to contact a member of Canonical launchpad team.

  • The Publisher (PPA or Ubuntu), which includes
    • publish-distro.py
    • process-accepted.py
    • cron.germinate (this one is owned by the Ubuntu team but we test it for them)
    • process-death-row.py
  • The upload processor (process-upload.py)
  • Ubuntu archive management tools (everything in scripts/ftpmaster-tools/)
  • Any package build types that require a buildd.

Dogfood has limited resources and is starting to get close to disk space limitations when restoring the production database. The database is restored very irregularly, and on no fixed schedule. Dogfood is very, very slow.

Getting more QA facilities on [qa]staging

It should be easy to run the txpkgupload daemon, and the upload processor and process-accepted script cron jobs on staging. It should also be possible to ask a LOSA to run one of the archive-admin scripts manually, when required, with no issues.

The publisher is a very different matter, because of the nature of the staging database getting restored every week, it will get out of sync with the published repositories. This can cause OOPSes in the scripts, some of which will be false alarms but will still look odd to the uninitiated. At best it will be transient, at worst it will block the publisher and hence QA. There are also some problems with librarian files getting expired in production that are not expired in staging which will also make the publisher fall over.

The PPA signing private keys are also not available outside of production - we remove the references in the dogfood DB to avoid the publisher problems in that area but if they need to be tested then it presents some manual work.

So, some more thought needs to be put into how best to handle publishing on staging.

Package Builds

On a new release of launchpad-buildd or soyuz code involved in building any of the various types, it is important to test that the builds succeed.

Translation Templates

You probably want:

Source Package Recipe Build

There is a full [[https://help.launchpad.net/Packaging/SourceBuilds/GettingStarted|Procedure] for creating a recipe and uploading it to launchpad.

A shorter way is to use an existing project on dogfood and create a new recipe (or build an existing one). launchpad-buildd is a good candidate.

  1. Create a recipe
  2. Either 'Use an existing PPA' if you have one, or create a new one.
  3. Bionic and Xenial are a good choice for distribution series
  4. Request a build

A Source Package Recipe Build that builds into a PPA will also cause a Binary Package Build to happen, but it is still worth testing that separately.

Binary Package Build

These are created on the upload of a package for building into a PPA.

  1. Create a PPA. This can be skipped if you've already done this.

  2. Follow the Soyuz/ReUploadPackage instructions. sl is a good candidate package.

A Source Package Recipe Build will also cause these builds to happen.

OCI Image Build

These build OCI ('docker') images, they are closely related to the snap package builds, but different enough to need separate testing. They require a git repository with an appropriate Dockerfile to already exist. This can be used.

  1. Create an OCI project under a distribution that supports OCI. This is a good candidate.

  2. Create a recipe for this OCI Project, using 'Create OCI recipe'
  3. Fill in the details of the recipe and the source git repository. Any architecture that has docker in the archive should work.
  4. You can add a push rule / credentials once the recipe is created, if you need to test the OCI image being pushed to a registry.
  5. Request a build of this recipe.

Snap Build

Snap builds require a git branch to build from. It is slightly awkward to arrange for dogfood to do this, as it has no turnip or similar. Fortunately, snaps support building from external repositories, which can be either production launchpad (launchpad.net), github, or similar service.

  1. Create a snap on dogfood via lp-shell: `lp.snaps.new(name='test-from-api', owner=lp.me, git_repository_url='url-to-repository', git_path='branch-to-build')

  2. Find the snap via the Web UI

  3. Request a build of the snap

Soyuz/QA (last edited 2020-11-17 10:06:41 by twom)