Ticket #61 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

bonsaipoller bug fixes

Reported by: Pike Owned by: warner
Priority: major Milestone: 0.7.6
Version: 0.7.5 Keywords:
Cc: warner, Pike, joduinn

Description

bonsaipoller has a few bugs, which we fixed on the mozilla side, see  bug 389645.

There's going to be a follow-up patch to use twistd.web instead of liburl to query bonsai without blocking and with a timeout.

Attachments

bonsaipoller.patch Download (1.3 KB) - added by Pike 3 years ago.
support empty check-in comments, fix files array for multiple check-ins
bp-async.patch Download (1.7 KB) - added by Pike 3 years ago.
use twisted.web.client.getPage instead of urllib.urlopen
test_bonsaipoller.patch Download (3.5 KB) - added by Pike 3 years ago.
use content instead of StringIO for tests, now that BonsaiParser? takes content

Change History

Changed 3 years ago by Pike

support empty check-in comments, fix files array for multiple check-ins

Changed 3 years ago by Pike

  • cc warner added
  • owner changed from warner to Pike

I just landed  bug 389706, which replaces the call to urllib.urlopen with twisted.web.client.getPage. That's making bonsai poller query bonsai asynchronously, and adds support for timeouts, too. Thus, a dying bonsai doesn't block the complete master anymore. It's reviewed by bhearsum.

Changed 3 years ago by Pike

use twisted.web.client.getPage instead of urllib.urlopen

Changed 3 years ago by warner

I tried applying these to current HEAD, but test_bonsaipoller then failed. Am I doing something wrong?

Changed 3 years ago by warner

Here are the test failures I observed:

===============================================================================
[ERROR]: buildbot.test.test_bonsaipoller.TestBonsaiPoller.testFullyFormedResult

Traceback (most recent call last):
  File "/home/warner/stuff/Projects/BuildBot/trees/bonsaipoller/buildbot/test/test_bonsaipoller.py", line 119, in testFullyFormedResult
    br = BonsaiParser(StringIO(goodUnparsedResult))
  File "/home/warner/stuff/Projects/BuildBot/trees/bonsaipoller/buildbot/changes/bonsaipoller.py", line 78, in __init__
    raise InvalidResultError("Malformed XML in result")
buildbot.changes.bonsaipoller.InvalidResultError: 'Malformed XML in result'
===============================================================================
[ERROR]: buildbot.test.test_bonsaipoller.TestBonsaiPoller.testMissingCiResult

Traceback (most recent call last):
  File "/home/warner/stuff/Projects/BuildBot/trees/bonsaipoller/buildbot/test/test_bonsaipoller.py", line 171, in testMissingCiResult
    BonsaiParser(StringIO(missingCiResult))
  File "/home/warner/stuff/Projects/BuildBot/trees/bonsaipoller/buildbot/changes/bonsaipoller.py", line 78, in __init__
    raise InvalidResultError("Malformed XML in result")
buildbot.changes.bonsaipoller.InvalidResultError: 'Malformed XML in result'
-------------------------------------------------------------------------------

Changed 3 years ago by Pike

use content instead of StringIO for tests, now that BonsaiParser? takes content

Changed 3 years ago by Pike

  • cc Pike added

oops, you caught me not running tests, obviously. Sorry.

The fix is simple, as the bonsai content handlers now take content instead of file-like objects, we mustn't use StringIO.

Changed 3 years ago by Pike

Just landed the fix for the tests on our repository, with r=bhearsum.

Changed 3 years ago by warner

  • owner changed from Pike to warner
  • status changed from new to assigned
  • milestone set to 0.7.6

Changed 3 years ago by joduinn

  • cc joduinn added

Changed 3 years ago by warner

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.