From db77f336a7fd657f3923f5d16f921ae38956e80f Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Mon, 29 Jun 2026 18:30:39 +0200 Subject: [PATCH 1/4] Expand/modernize instructions for adding a new worker --- README.md | 34 +++++++++++++++++++++++++++------- master/custom/workers.py | 4 ++++ 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5e2f51d7..f7c9151e 100644 --- a/README.md +++ b/README.md @@ -47,15 +47,35 @@ a `*/15` cron interval using the `update-master` target in `Makefile`. ## Add a worker -The list of workers is stored in `/etc/buildbot/settings.yaml` on the server. -A worker password should be made of 14 characters (a-z, A-Z, 0-9 and special -characters), for example using KeePassX. +To add a worker, people follow the [Devguide](https://devguide.python.org/testing/new-buildbot-worker/) +which directs them to an issue template to fill out. +Make sure you have all the info the template asks for. -* Generate a password -* Add the password in `/etc/buildbot/settings.yaml` -* Restart the buildbot server: `make restart-master` +If the owner did not request a new password (that is, they're reusing one +from an existing worker): + +* Make a PR (or ask the new owner to make a PR) that adds the worker to + `master/custom/workers.py`, with the owner username as first component +* Check `/etc/buildbot/settings.yaml` on the server: the email and GitHub + username should match +* Merge the PR +* Watch the logs; wait for Salt to pull the PR and restart the server. +* Close the issue. You're done. + +When adding a new owner, or a new worker password for an existing owner, +do the following first: + +* Generate a password using e.g.: + + import secrets + secrets.token_urlsafe(14) + +* Check the username doesn't already exist in `/etc/buildbot/settings.yaml` +* Add an owner entry to `/etc/buildbot/settings.yaml` +* Check the config using `make check` (on the server) +* E-mail the password to the new owner. +* As above: add the worker to `master/custom/workers.py`; merge; restart. -Documentation: http://docs.buildbot.net/current/manual/configuration/workers.html#defining-workers ## Testing changes locally diff --git a/master/custom/workers.py b/master/custom/workers.py index c0d95ff4..9d41bfa6 100644 --- a/master/custom/workers.py +++ b/master/custom/workers.py @@ -10,6 +10,10 @@ from custom.worker_downtime import no_builds_between +# List of workers. +# See also: Buildbot worker documentation, http://docs.buildbot.net/current/manual/configuration/workers.html#defining-workers + + # By default, the buildmaster sends a simple, non-blocking message to each # worker every hour. These keepalives ensure that traffic is flowing over the From 2e96b3b3d649786b453158dd463c8cb3165b7835 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 1 Jul 2026 13:29:31 +0200 Subject: [PATCH 2/4] Add donts after sentences --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f7c9151e..ffff46ad 100644 --- a/README.md +++ b/README.md @@ -55,10 +55,10 @@ If the owner did not request a new password (that is, they're reusing one from an existing worker): * Make a PR (or ask the new owner to make a PR) that adds the worker to - `master/custom/workers.py`, with the owner username as first component + `master/custom/workers.py`, with the owner username as first component. * Check `/etc/buildbot/settings.yaml` on the server: the email and GitHub - username should match -* Merge the PR + username should match. +* Merge the PR. * Watch the logs; wait for Salt to pull the PR and restart the server. * Close the issue. You're done. @@ -70,9 +70,9 @@ do the following first: import secrets secrets.token_urlsafe(14) -* Check the username doesn't already exist in `/etc/buildbot/settings.yaml` -* Add an owner entry to `/etc/buildbot/settings.yaml` -* Check the config using `make check` (on the server) +* Check the username doesn't already exist in `/etc/buildbot/settings.yaml`. +* Add an owner entry to `/etc/buildbot/settings.yaml`. +* Check the config using `make check` (on the server). * E-mail the password to the new owner. * As above: add the worker to `master/custom/workers.py`; merge; restart. From 09d721078194c63c4974a19615575e3119d15872 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 1 Jul 2026 13:37:02 +0200 Subject: [PATCH 3/4] Add links to Devguide --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index ffff46ad..32e401df 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,13 @@ [![Check config](https://github.com/python/buildmaster-config/actions/workflows/check.yml/badge.svg)](https://github.com/python/buildmaster-config/actions/workflows/check.yml) +> [!NOTE] +> This README has instructions for Buildbot administrators. +> User guides are in the Devguide: +> - [Working with buildbots](https://devguide.python.org/testing/buildbots/) +> - [New buildbot workers](https://devguide.python.org/testing/new-buildbot-worker/) + + ## Private settings The production server uses /etc/buildbot/settings.yaml configuration file which From 1040cc33c72a6303ad2967575322abc2d93e1819 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 2 Jul 2026 09:57:46 +0200 Subject: [PATCH 4/4] Use print() Co-authored-by: Victor Stinner --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 32e401df..429e5c79 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ do the following first: * Generate a password using e.g.: import secrets - secrets.token_urlsafe(14) + print(secrets.token_urlsafe(14)) * Check the username doesn't already exist in `/etc/buildbot/settings.yaml`. * Add an owner entry to `/etc/buildbot/settings.yaml`.