This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Buildbot: send email notifications to buildbot-status@
Type: Stage: resolved
Components: Tests Versions: Python 3.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: vstinner, zach.ware
Priority: normal Keywords: buildbot, patch

Created on 2017-05-09 23:37 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
buildbot-0.8.14py1.patch vstinner, 2017-05-10 00:28
Messages (7)
msg293362 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-09 23:37
I created a new mailing list to get email notifications when a buildbot starts failing (state change from green/success to red/failure).

It seems like the buildbot config already sends email, but I don't see them in the archives of the python-checkins list?


python-checkins archives:
msg293363 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-09 23:54
On the buildbot server, I see the following code in lib/python/buildbot/status/

        # GB: NEW: add test logfile excerpts
        if "test" in t: # only if the test went wrong
            for log in build.getLogs():
                if "test" in log.getStep().getName():
                    text += "\n"
                    text += "Excerpt from the test logfile:"
                    text += interpret_test_logfile(log.getText().splitlines())
                    text += "\n"

But I'm unable to find this code in the upstream code:

Do we have downstream changes on buildbot? I'm asking because it seems like emails cannot be send because of these lines. Extract of logs:

2017-05-05 11:55:42+0000 [-] Exception caught notifying <buildbot.status.mail.MailNotifier instance at 0x7f9512f3add0> of buildFinished event
2017-05-05 11:55:42+0000 [-] Unhandled Error
        Traceback (most recent call last):
          File "/data/buildbot/lib/python/buildbot/status/", line 320, in buildFinished
          File "/data/buildbot/lib/python/buildbot/status/", line 792, in buildMessage
            if "test" in t: # only if the test went wrong
        exceptions.NameError: global name 't' is not defined

Note: It seems like 0.8.14 is deployed, but I don't see any v0.8.14 tag on GitHub, the last one of the 0.8 branch is v0.8.12. wasn't tagged in Git?
msg293364 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-09 23:57
It seems like the code is copied by rsync from a server called dinsdale:
msg293365 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-10 00:28
To rebuild the lib/python/buildbot/ directory, you can start from buildbot 0.8.14 and then apply attached buildbot-0.8.14py1.patch diff.
msg293386 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-10 06:57
Ok, Zachary gave me a clue, the code comes from

It seems like our server is outdated, since buildbot/status/ now contains:

        # GB: NEW: add test logfile excerpts
        # AP: disabled (code is broken)
        if 0 and "test" in t: # only if the test went wrong
msg293431 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-10 16:12
Zachary updated the buildbot Git repository to get the fix.

I changed the email address to

Let's see how things are going.
msg293826 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-17 00:18
Email notifications is now working properly, I close the issue.
Date User Action Args
2022-04-11 14:58:46adminsetgithub: 74510
2017-05-17 00:18:54vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg293826

stage: resolved
2017-05-10 16:12:50vstinnersetmessages: + msg293431
2017-05-10 06:57:06vstinnersetmessages: + msg293386
2017-05-10 00:28:28vstinnersetfiles: + buildbot-0.8.14py1.patch
keywords: + patch
messages: + msg293365
2017-05-09 23:57:39vstinnersetmessages: + msg293364
2017-05-09 23:54:30vstinnersetmessages: + msg293363
2017-05-09 23:37:08vstinnercreate