Ticket #492 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

"try_wait" in .buildbot/options does not work

Reported by: ipv6guru Owned by:
Priority: minor Milestone: 0.8.0
Version: 0.7.12 Keywords: sourceforge 1685082
Cc: cdadhemar@…

Description

When using "buildbot try" mode and wanting to wait for the output you are supposed to be able to either a) specify "--wait" on the command line, or b) put a "try_wait" line in .buildbot/options.

The options file method does not work. It appears that the getopt() method in the Try class does not work with flag type arguments. This is because it only falls back to the options file if no value is specified for an option, yet flag type options always default to "False". Hence there is always a value present and it is not possible to read a flag from the options file. Submitted: chris ( chris-bkb ) - 2007-03-21 20:02

Change History

comment:1 Changed 4 years ago by ipv6guru

Moved from sourceforge

comment:2 Changed 4 years ago by dustin

  • Milestone changed from undecided to 0.7.11

yep, this stuff is a mess.

comment:3 Changed 4 years ago by dustin

  • Milestone changed from 0.7.11 to 0.7.12

The try stuff, and .buildbot/options, need *badly* to be cleaned up.

comment:4 Changed 3 years ago by dustin

  • Status changed from new to closed
  • Resolution set to fixed
commit 2b69157655f299d8459ecbc92637a6ffd0e9130f
Author: Dustin J. Mitchell <dustin@zmanda.com>
Date:   Tue Dec 29 17:39:44 2009 -0600

    refs #286, #492 - fix optionfile parsing for buildbot subcommands, with improved docs

comment:5 Changed 3 years ago by cdadhemar

  • Status changed from closed to reopened
  • Cc cdadhemar@… added
  • Priority changed from major to minor
  • Version changed from 0.7.10 to 0.7.12
  • Milestone changed from 0.7.12 to undecided
  • Resolution fixed deleted

Hello,

The problem still occurs on 0.7.12 using the buildbot try --wait option. I have the following backtrace :

Traceback (most recent call last):

File "/data/mwrep/scs/python2.6/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-x86_64.egg/twisted/internet/defer.py", line 280, in unpause

self._runCallbacks()

File "/data/mwrep/scs/python2.6/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-x86_64.egg/twisted/internet/defer.py", line 323, in _runCallbacks

self.result = callback(self.result, *args, kw)

File "/data/mwrep/scs/python2.6/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-x86_64.egg/twisted/internet/defer.py", line 284, in _continue

self.unpause()

File "/data/mwrep/scs/python2.6/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-x86_64.egg/twisted/internet/defer.py", line 280, in unpause

self._runCallbacks()

--- <exception caught here> ---

File "/data/mwrep/scs/python2.6/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-x86_64.egg/twisted/internet/defer.py", line 323, in _runCallbacks

self.result = callback(self.result, *args, kw)

File "/data/mwrep/scs/python2.6/lib/python2.6/site-packages/buildbot-0.7.12-py2.6.egg/buildbot/scripts/tryclient.py", line 680, in <lambda>

d.addCallback(lambda res: self.getStatus())

File "/data/mwrep/scs/python2.6/lib/python2.6/site-packages/buildbot-0.7.12-py2.6.egg/buildbot/scripts/tryclient.py", line 499, in getStatus

wait = bool(self.getopt("wait", "try_wait", False))

exceptions.TypeError?: getopt() takes at most 3 arguments (4 given)

Indeed Try.getopt should take only 3 arguments ... Maybe the correct code would be :

wait = bool(self.getopt("try_wait", False))

But I am really new to buildbot and I have to say that I have not a great understanding of the code yet ... Time will come that I will be able to submit a patch !

Until this is fixed the --wait option is not usable. Thank you very much for your help on this issue !

Cheers, CH

comment:6 Changed 3 years ago by krajaratnam

  • Milestone changed from undecided to 0.8.0

I _think_ I fixed this in commit 0c0d528a3a4562cdd03d8eacb27c18a655a4059e. Can you check trunk?

comment:7 Changed 3 years ago by cdadhemar

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

I have applied the patch on my 0.7.12 installation. I confirm that it fixes the issue. Thanks a lot !

Note: See TracTickets for help on using tickets.