Skip to content
pypyPublic

About

buildbot as used by pypy

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Current buidlbot status

This is the code for PyPy's buildbot, powering buildbot.pypy.org. It was imported in April 2026 from https://foss.heptapod.net/pypy/buildbot. The service is managed via ssh into the machine, and running the restart_buildmaster_when_not_running script. It uses a python2.7 venv.

Everything has been tested with builbot 0.8.8 on CPython2.7 Note you must pin "automat==20.2" "incremental==21.3.0" Testing must use "pytest<4"

Patch the source

buildbot 0.8.8 is really old. There are some patches needed, see patches.patch. These patch the installed buildbot package, not this repository's own source, so they are not applied automatically by git pull / hg pull and must be (re-)applied by hand.

The buildmaster is started with $PYPY_HOME/bin/buildbot, so the install that matters is $PYPY_HOME/site-packages -- see PATCH_ROOT in restart_buildmaster_when_not_running, which refuses to restart until the patches are in that copy. The paths inside patches.patch start with site-packages/, so apply it from the directory above:

$ patch -d $PYPY_HOME -p0 -F0 < <path-to-this-checkout>/patches.patch

If you are starting from a new db, you will need to also patch the installed migrate and buildbot packages for newer sqlite3:

$ cd $PYPY_HOME/site-packages
$ patch migrate/changeset/databases/sqlite.py < <checkout>/patch-migrate.patch
$ patch buildbot/db/migrate/versions/018_add_sourcestampset.py < <checkout>/patch-buildbot.patch

This only needs to be done once per install -- not before every restart -- but it must be redone whenever those packages are reinstalled or upgraded, since that overwrites the patched files with pristine ones from PyPI.

How to hack the PyPy buildbot

If you want to run buildbot locally, you need to:

  1. create and populate a python2.7 venv with pip install -r requirements.txt, then apply the patches described in "Patch the source" above to it.

  2. create a file master/slaveinfo.py which contains the password for the local slave you will run:

    passwords = {"localhost": "an_arbitrary_password" }
    
  3. cd master; make debug

  4. cd slave; make debug

How to run the PyPy buildbot

pypybuildbot.util.we_are_debugging returns False unless PYPYBUILDBOT_DEBUG is set, which make debug does, so a production master needs no local change for it.

As above, make sure the install has the patches from "Patch the source" applied -- this is easy to forget after reinstalling, and the buildmaster will start "successfully" without them, only misbehaving later under load.

You still need to fill master/slaveinfo.py with the passwords of the various slaves you want to use.

Then, to start the buildbot master: buildbot start <path-to pypy-buildbot/master>

To restart the buildmaster

$ cd pypy-buildbot

$ hg pull -u

$ cd master

$ buildbot checkconfig

$ buildbot reconfig

OR

$ buildbot stop

$ buildbot start

OR

$ ./restart_buildmaster_when_not_running

Note: a plain restart does not reinstall anything, so patches already applied remain in place -- you only need to revisit "Patch the source" if those packages were reinstalled or upgraded.

To run a buildslave

Please refer to README_BUILDSLAVE

About

buildbot as used by pypy

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages