#177 setup buildbot notifications for task execution failures
Closed: Fixed None Opened 9 years ago by tflink.

One thing that we're still missing when compared to AutoQA is some kind of notification of task execution failure.

For the short/medium term, we can use the buildbot status targets:
[[http://docs.buildbot.net/current/manual/cfg-statustargets.html#id13|MailNotifier]]
[[http://docs.buildbot.net/current/manual/cfg-statustargets.html#irc-bot|IRC Bot]]

Adjust buildbot configuration such that emails are sent out to a results list for at least all tasks which generate exceptions, possibly all execution failures. Including the last bit of log (example in the MailNotifier docs) would be a good place to start.


The patch: https://bitbucket.org/fedoraqa/ansible-playbooks/commits/c43b023fb4744fc1ace90979b4be63d3da8de434

An example how format of an e-mail would look like (just an idea, the formating is broken in phab):

Build status: SUCCESS
Buildslave for this Build: example-slave
Complete logs for all build steps: http://localhost:8011/builders/runtests/builds/9
Build Reason: A build was forced by 'pyflakes ': force build

Detailed log of last build step: http://localhost:8011/builders/runtests/builds/9/steps/flakes/logs/stdio
Last 80 lines of "flakes.stdio"

twisted.trial.unittest.FailTest: for input:

        try:
            import fu
        except ImportError:
            pass

expected outputs:
[]
but got:
(none):3: 'fu' imported but unused

pyflakes.test.test_imports.Test.test_importingForImportError
===============================================================================
[TODO]
Reason: ''
Traceback (most recent call last):
  File "/home/mkrizek/tmp/slave/runtests/build/pyflakes/test/test_imports.py", line 455, in test_tryingMultipleImports
    ''')
  File "/home/mkrizek/tmp/slave/runtests/build/pyflakes/test/harness.py", line 26, in flakes
    %s''' % (input, repr(expectedOutputs), '\n'.join([str(o) for o in w.messages])))
twisted.trial.unittest.FailTest: for input:

        try:
            import fu
        except ImportError:
            import bar as fu

expected outputs:
[]
but got:
(none):5: redefinition of unused 'fu' from line 3
(none):5: 'fu' imported but unused

pyflakes.test.test_imports.Test.test_tryingMultipleImports
===============================================================================
[TODO]
Reason: 'this requires finding all assignments in the function body first'
Traceback (most recent call last):
  File "/home/mkrizek/tmp/slave/runtests/build/pyflakes/test/test_other.py", line 25, in test_localReferencedBeforeAssignment
    ''', m.UndefinedName)
  File "/home/mkrizek/tmp/slave/runtests/build/pyflakes/test/harness.py", line 26, in flakes
    %s''' % (input, repr(expectedOutputs), '\n'.join([str(o) for o in w.messages])))
twisted.trial.unittest.FailTest: for input:

        a = 1
        def f():
            a; a=1
        f()

expected outputs:
[<class 'pyflakes.messages.UndefinedName'>]
but got:
(none):4: local variable 'a' (defined in enclosing scope on line 2) referenced before assignment
(none):4: local variable 'a' is assigned to but never used

pyflakes.test.test_other.Test.test_localReferencedBeforeAssignment
===============================================================================
[TODO]
Reason: ''
Traceback (most recent call last):
  File "/home/mkrizek/tmp/slave/runtests/build/pyflakes/test/test_undefined_names.py", line 87, in test_definedByGlobal
    ''')
  File "/home/mkrizek/tmp/slave/runtests/build/pyflakes/test/harness.py", line 26, in flakes
    %s''' % (input, repr(expectedOutputs), '\n'.join([str(o) for o in w.messages])))
twisted.trial.unittest.FailTest: for input:

        def a(): global fu; fu = 1
        def b(): fu

expected outputs:
[]
but got:
(none):3: undefined name 'fu'

pyflakes.test.test_undefined_names.Test.test_definedByGlobal
-------------------------------------------------------------------------------
Ran 162 tests in 0.136s

PASSED (expectedFailures=5, successes=157)

-The Buildbot

This has been moved to ansible and deployed on stg, prod. closing

Login to comment on this ticket.

Metadata