buildbot: correct monotone source step

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

buildbot: correct monotone source step

Markus Wanner-2
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

_______________________________________________
Monotone-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/monotone-devel

buildbot_mtn_fix.diff (2K) Download Attachment
signature.asc (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Buildbot-devel] buildbot: correct monotone source step

Pierre Tardy


Le ven. 17 avr. 2015 à 06:40, Markus Wanner <[hidden email]> a écrit :
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:

Hi Markus,
As an open-source project, buildbot is dependant on its community to make all its features work. As you seem like a monotone expert, we would greatly appreciate if you could contribute a fix to the monotone master side step, that would include making sure the unit tests are correct so that we can maintain the step in a workable state.
Here are the guidelines for contributions, which includes creating a Pull-Request on github, so that we can properly review it, and automatically run the unit tests suite on it.

Regards
Pierre

_______________________________________________
Monotone-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/monotone-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Buildbot-devel] buildbot: correct monotone source step

Markus Wanner-2
Pierre,

On 04/18/2015 02:17 PM, Pierre Tardy wrote:
> As an open-source project, buildbot is dependant on its community to
> make all its features work. As you seem like a monotone expert, we would
> greatly appreciate if you could contribute a fix to the monotone master
> side step, that would include making sure the unit tests are correct so
> that we can maintain the step in a workable state.

My spare time is rather limited, but I'll try to help.

> Here are the guidelines for contributions, which includes creating a
> Pull-Request on github, so that we can properly review it, and
> automatically run the unit tests suite on it.
> https://github.com/buildbot/buildbot/blob/master/CONTRIBUTING.rst

I'll have to read through this, as I'm not familiar with github (nor
anything specific to the buildbot development process).

From quickly glancing over it, two questions arise:

 * For eight, do I simply file a second pull request on branch 'eight'
   rather than 'master'?

 * Is there an easy way to locally run tests? Without having to install
   and setup a full buildbot master?

I'd appreciate some help to get started.

Regards

Markus


_______________________________________________
Monotone-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/monotone-devel

signature.asc (1K) Download Attachment