monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] buildbot: correct monotone source step


From: Markus Wanner
Subject: [Monotone-devel] buildbot: correct monotone source step
Date: Fri, 17 Apr 2015 15:02:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0

Hi,

on buildbot.monotone.ca, a buildbot master instance is running. As
recently brought up on IRC, I had issues with it since I switched to use
the newer server-side source step.

The attached patch fixes two issues in steps/source/mtn.py:

 a) in _sourcedirIsUpdatable, the inline function cont served as a
    callback to the deferred returned by _sourcedirIsUpdatable. However,
    it uses d.addCallback, where d is what's calling it. I.e. at the
    time of execution, d is already called. It seems strange to add
    another callback. Further, and probably the actual bug: It doesn't
    return a value. I think that's what led to the hang I originally
    discovered.

    I fixed it rewriting _sourcedirIsUpdatable as an inlined
    callback method, which first checks for the existence of both, the
    _MTN directory and the database db.mtn, and only decides *after*
    both checks. I added proper logging to simplify debugging in the
    future.

 b) startVC calls _checkDb, which in turn runs 'mtn db info' on the
    database db.mtn. However, if the database doesn't exist, yet, that
    command fails, writing an error message to stderr (not stdout).
    This aborts the entire step, rather than creating and filling the
    database.

    The fix in the patch is not optimal: I simply set abandonOnFailure
    to False. A better solution would be to check for the existence of
    the database db.mtn first (that's done in _sourcedirIsUpdatable,
    anyways) and only run 'mtn db info' if it is known to exist. (Or
    skip the existence test and properly parse stderr. However, that
    seems prone to error, IMO.)

The patch as attached applies to buildbot release 0.8.10. I'm happy to
test an improved variant of it, if necessary.

Regards

Markus Wanner

Attachment: buildbot_mtn_fix.diff
Description: Text Data

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]