[Buildbot-devel] Problems/Bug(?) with WithProperties on windows

Dustin J. Mitchell dustin at v.igoro.us
Fri Aug 8 12:40:42 UTC 2014


>           WithProperties('if [ %(fullclean:-no)s == yes ]; then echo pwd; rm -rfv *; echo fully cleaned; fi'),

There's no property named "fullclean:-no".  That's formatted as if you
were using Interpolate, yet you're using WithProperties.  Did you mean
to use Interpolate?

Dustin

On Fri, Aug 8, 2014 at 2:50 AM, Ian Bell <ian.h.bell at gmail.com> wrote:
> I stayed up super late last night pulling my hair out trying to get an
> interpolate step to work, and now I am not convinced that there isn't a bug
> in buildbot somewhere.  In my code I have something like
>
> from buildbot.process.properties import WithProperties
>     # Was the build started from the force build form with a "fullclean"
>     # property set? If so, clobber the checkout folders.
>     if platform.startswith('win'):
>         cmd = ['cmd', '/c', WithProperties('if %(fullclean:-no)s == no (del
> /q *) ')]
>     else:
>         cmd = ['bash', '-c',
>            WithProperties('if [ %(fullclean:-no)s == yes ]; then echo pwd;
> rm -rfv *; echo fully cleaned; fi'),
>            ]
>     factory.addStep(ShellCommand(command=cmd, description='fullclean?',
> workdir=""))
>
> which works fine on linux/OSX, but fails on windows.  When this runs on
> windows, I get the traceback err.txt of
>
> Traceback (most recent call last):
> Failure: twisted.internet.defer.FirstError: FirstError[#12, [Failure
> instance: Traceback (failure with no frames): <class
> 'twisted.internet.defer.FirstError'>: FirstError[#2, [Failure instance:
> Traceback: <type 'exceptions.TypeError'>: not enough arguments for format
> string
> /home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:157:render
> /home/coolprop/opt/lib/python2.7/site-packages/twisted/internet/defer.py:139:maybeDeferred
> /home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:722:getRenderingFor
> /home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:157:render
> --- <exception caught here> ---
> /home/coolprop/opt/lib/python2.7/site-packages/twisted/internet/defer.py:139:maybeDeferred
> /home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:309:getRenderingFor
> ]]
> ]]
>
> and the err.html of
>
> twisted.internet.defer.FirstError: FirstError[#12, [Failure instance:
> Traceback (failure with no frames): <class
> 'twisted.internet.defer.FirstError'>: FirstError[#2, [Failure instance:
> Traceback: <type 'exceptions.TypeError'>: not enough arguments for format
> string
> /home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:157:render
> /home/coolprop/opt/lib/python2.7/site-packages/twisted/internet/defer.py:139:maybeDeferred
> /home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:722:getRenderingFor
> /home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:157:render
> --- <exception caught here> ---
> /home/coolprop/opt/lib/python2.7/site-packages/twisted/internet/defer.py:139:maybeDeferred
> /home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:309:getRenderingFor
> ]] ]]
> twisted.internet.defer.FirstError: FirstError[#12, [Failure instance:
> Traceback (failure with no frames): <class
> 'twisted.internet.defer.FirstError'>: FirstError[#2, [Failure instance:
> Traceback: <type 'exceptions.TypeError'>: not enough arguments for format
> string
> /home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:157:render
> /home/coolprop/opt/lib/python2.7/site-packages/twisted/internet/defer.py:139:maybeDeferred
> /home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:722:getRenderingFor
> /home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:157:render
> --- <exception caught here> ---
> /home/coolprop/opt/lib/python2.7/site-packages/twisted/internet/defer.py:139:maybeDeferred
> /home/coolprop/opt/lib/python2.7/site-packages/buildbot/process/properties.py:309:getRenderingFor
> ]] ]]
>
> I am a bit at a loss to make sense of this since it seems to work fine on
> linux and I don't see any obvious differences between the two calls.  It
> complains about a typeerror, but really it seems fine to me.  I have checked
> that the windows shell can do a command like
>
> if yes == no (del /q *)
>
> and it seems to be fine.  Anyone have an idea?
>
> Thanks,
> Ian
>
>
>
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>




More information about the devel mailing list