Skip to content

Buildbot: send email notifications to buildbot-status@ #74510

Closed

Description

@vstinner
BPO 30325
Nosy @vstinner, @zware
Files
  • buildbot-0.8.14py1.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-05-17.00:18:54.341>
    created_at = <Date 2017-05-09.23:37:08.128>
    labels = ['3.7', 'tests']
    title = 'Buildbot: send email notifications to buildbot-status@'
    updated_at = <Date 2017-05-17.00:18:54.309>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-05-17.00:18:54.309>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-05-17.00:18:54.341>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2017-05-09.23:37:08.128>
    creator = 'vstinner'
    dependencies = []
    files = ['46853']
    hgrepos = []
    issue_num = 30325
    keywords = ['patch', 'buildbot']
    message_count = 7.0
    messages = ['293362', '293363', '293364', '293365', '293386', '293431', '293826']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'zach.ware']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue30325'
    versions = ['Python 3.7']

    Activity

    1. vstinner commented on May 9, 2017

      @vstinner
      MemberAuthor

      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

    2. vstinner commented on May 9, 2017

      @vstinner
      MemberAuthor

      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?

    3. vstinner commented on May 9, 2017

      @vstinner
      MemberAuthor

      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

    4. vstinner commented on May 10, 2017

      @vstinner
      MemberAuthor

      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.

    5. vstinner commented on May 10, 2017

      @vstinner
      MemberAuthor

      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
    6. vstinner commented on May 10, 2017

      @vstinner
      MemberAuthor

      Zachary updated the buildbot Git repository to get the mail.py fix.

      I changed the email address to buildbot-status@python.org:
      python/buildmaster-config#5

      Let's see how things are going.

    7. vstinner commented on May 17, 2017

      @vstinner
      MemberAuthor

      Email notifications is now working properly, I close the issue.

    8. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of lifetestsTests in the Lib/test dir

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions