New testing flathub build infrastructure

Alexander Larsson alexl at redhat.com
Mon Dec 3 16:58:50 UTC 2018


The last few weeks we've been working on the flathub build
infrastructure, because the current setup is both overloaded and not a
great experience.

Today we landed a test instance of the new setup at:
  http://repo-test.flathub.org:8010/#/

One of the main differences with the old one is that all the work
maintaining the repository was broken out to its own microservice that
buildbot calls out to. This has some internal performance advantages,
but the most visible change is that new builds are now staged in a
temporary build repository, where they can be tested before they are
published (or discarded). This also happens for test builds, allowing
you to test test builds from a PR (although these can't be published).

Builds can be published or deleted from the build page
(e.g. http://repo-test.flathub.org:8010/#/builders/6/builds/25) by
clicking on the publish/delete buttons, but you don't do anything then
test builds will be automatically deleted after 5 days and official
builds will be auto-published after 1 day (configurable per app in the
flathub.json file in the repo).

There are also a lot of changes in the buildbot UI/behaviour:

 * There is a list of all apps built (so far) at:
   http://repo-test.flathub.org:8010/#/apps

 * There is a page per app with build of that app:
   http://repo-test.flathub.org:8010/#/apps/org.gnome.frogr

 * The home page shows all current builds, a list of official builds
   that have not yet been published, and a list of recent builds of
   all types.

 * The per-app page shows current builds, list of test/official builds
   that have not been deleted or published, as well as a list of
   recent builds. Additionally there is a graph of build times.

 * The build page shows a link to the flatpakref file for the build repo
   once the app is built, allowing you to easily test it. This is removed
   when the build is later published or deleted.

 * Actions in the UI are now available to everyone, not just admins.
   The available actions are generally: start build, rebuild, publish
   and delete, and are available as buttons on homepage, app page
   and the individual build pages. Access to these actions is gated
   by github commit access to the respective git repositories.

 * Whenever a build is published, all earlier non-test builds are
   automatically discarded, to avoid accidentally publishing things in
   the wrong order. Also, when auto-publishing, only the latest build
   is published.

 * All PRs now automatically trigger a rebuild when filed and when
   updated, and the bot makes comments in the PR with links to the
   builds and results. For example:
   https://github.com/flathub/org.gnome.frogr/pull/4

 * The new bot responds to "testbot, build" in PR comments, and
   now also lets you specify a custom arch to build on.
   "testbot, build on arm".

 * Non-maintainers area allowed to queue test builds via PRs or
   "testbot, build" comments, but such "untrusted" builds are
   serialized (max 1 at a time) in order to minimize risk for misuse.

 * The new buildbot doesn't support importing from other repos. Instead we
   can give out tokens that allow generic uploads limited to a particular
   app-id prefix. For eaxmple, the goal is to give the freedesktop sdk
   project free access to uploading org.freedesktop.Sdk.*.

The testing code is deployed on a single machine, so it only builds
x86-64 and it will not be as fast as the main builders. However, I
hope we can migrate the official setup to this soon.

Please try this out and give feedback.


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                Red Hat, Inc
       alexl at redhat.com         alexander.larsson at gmail.com


More information about the Flatpak mailing list