Ticket #286 (closed defect: fixed)
.buildbot/options not picking up username etc for sendchange
| Reported by: | gregb | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.7.12 |
| Version: | 0.7.7 | Keywords: | |
| Cc: |
Description
Have been setting up buildbot (am a new user, on win32, locally hosting master and slave), have successfully started master / slaves can connect / browse etc.
buildbot sendchange --master=localhost:9989 --username someuser
works, but setting the 'username' option in the .buildhost/options does not. My .buildhost/options:
master = 'somehost:9989' username = 'someuser'
Looking into this I found that runner.py loadOptions function does not return the localDict that was loaded from the file. Adding 'return localDict' to the end helps.
The next problem is that the suboptions have default values of None for the options like username etc. So code like
user = config.get('username', opts.get('username'))
master = config.get('master', opts.get('master'))
in sendChange sets user to None even though opts now has a 'username' value. Code in other routines does stuff like
master = config.get('master')
if not master:
master = opts.get('master')
I haven't tried debugging further at this point.
Change History
comment:2 Changed 4 years ago by dustin
- Milestone changed from undecided to 0.7.+
the try options need lots of work.
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
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
Made changes similar to the above in the runner.py file. This fixes the problem.
There's probably a nicer way of doing it. For example, given that master is a string
master = config.get('master') or opts.get('master')should work. But it kind of invites copying, and doesn't work for zero-able ints.