Issue30325
Created on 2017-05-09 23:37 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| buildbot-0.8.14py1.patch | vstinner, 2017-05-10 00:28 | |||
| Messages (7) | |||
|---|---|---|---|
| msg293362 - (view) | Author: STINNER Victor (vstinner) * ![]() |
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? Config: https://github.com/python/buildmaster-config/blob/master/master/master.cfg#L820-L827 python-checkins archives: https://mail.python.org/pipermail/python-checkins/2017-May/thread.html |
|||
| msg293363 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2017-05-09 23:54 | |
On the buildbot server, I see the following code in lib/python/buildbot/status/mail.py:
# 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"
break
But I'm unable to find this code in the upstream code:
https://github.com/buildbot/buildbot/blob/v0.8.12/master/buildbot/status/mail.py#L742
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/build.py", line 320, in buildFinished
(...)
File "/data/buildbot/lib/python/buildbot/status/mail.py", 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. https://pypi.python.org/pypi/buildbot/0.8.14 wasn't tagged in Git?
|
|||
| msg293364 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2017-05-09 23:57 | |
It seems like the code is copied by rsync from a server called dinsdale: https://github.com/python/psf-chef/blob/master/cookbooks/buildmaster.txt#L13 |
|||
| msg293365 - (view) | Author: STINNER Victor (vstinner) * ![]() |
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) * ![]() |
Date: 2017-05-10 06:57 | |
Ok, Zachary gave me a clue, the code comes from https://github.com/python/buildbot/ It seems like our server is outdated, since buildbot/status/mail.py 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) * ![]() |
Date: 2017-05-10 16:12 | |
Zachary updated the buildbot Git repository to get the mail.py fix. I changed the email address to buildbot-status@python.org: https://github.com/python/buildmaster-config/pull/5 Let's see how things are going. |
|||
| msg293826 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2017-05-17 00:18 | |
Email notifications is now working properly, I close the issue. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:46 | admin | set | github: 74510 |
| 2017-05-17 00:18:54 | vstinner | set | status: open -> closed resolution: fixed messages: + msg293826 stage: resolved |
| 2017-05-10 16:12:50 | vstinner | set | messages: + msg293431 |
| 2017-05-10 06:57:06 | vstinner | set | messages: + msg293386 |
| 2017-05-10 00:28:28 | vstinner | set | files:
+ buildbot-0.8.14py1.patch keywords: + patch messages: + msg293365 |
| 2017-05-09 23:57:39 | vstinner | set | messages: + msg293364 |
| 2017-05-09 23:54:30 | vstinner | set | messages: + msg293363 |
| 2017-05-09 23:37:08 | vstinner | create | |
