Ticket #2329 (closed undecided: fixed)

Opened 10 months ago

Last modified 10 months ago

Rebuild via web shows error incorrectly

Reported by: Jc2k Owned by:
Priority: major Milestone: undecided
Version: master Keywords:
Cc:

Description

With a recent snapshot of master (and by eye, the faulty code is still there on latest master) pressing the rebuild button works but shows an error message:

rebuilding a build failed (2140L, {'buildername': 2138L}) 

The faulty check is in buildbot/status/web/build.py:

tup = yield bc.rebuildBuild(b, reason, extraProperties)
# check that (bsid, brids) were properly stored
if not (isinstance(tup, tuple) and
        isinstance(tup[0], int) and
        isinstance(tup[1], dict)):
    msg = "rebuilding a build failed "+ str(tup)

It looks like it should work, apart from:

>>> isinstance(2L, int)
False
>>> isinstance(2L, long)
True

However i'm not sure if the db should be leaking long's or if other database backends do return int so opted to file a bug rather than sending a pull request.

Change History

comment:1 Changed 10 months ago by Dustin J. Mitchell

  • Status changed from new to closed
  • Resolution set to fixed

Don't test types too carefully (long is not an int)

This code really just needs to know whether there was an error. Fixes #2329.

Changeset: 673145e83fefb001c9dcc6579e5e2f962b4b43be

comment:2 Changed 10 months ago by Dustin J. Mitchell

Don't test types too carefully (long is not an int)

This code really just needs to know whether there was an error. Fixes #2329.

Changeset: 673145e83fefb001c9dcc6579e5e2f962b4b43be

Note: See TracTickets for help on using tickets.