[Buildbot-devel] Git build step logs in web status page

my_bulk at brettmingalls.com my_bulk at brettmingalls.com
Wed Nov 9 02:20:31 UTC 2011


The master and slave are on the same FreeBSD machine:

$ buildbot --version
Buildbot version: 0.8.3p1
Twisted version: 11.0.0

$ buildslave --version
Buildslave version: 0.8.4
Twisted version: 11.0.0

I put the traceback from setting logEnviron at the bottom of the 
message. It basically shows an unexpected keyword argument passed to 
buildbot.steps.source.Git in the buildbot/process/buildstep.py file.

I suspect that I'm calling the checkout step incorrectly because I 
noticed that the file you referenced, git.py, is never called. I went 
back to the docs on buildbot.net and it says to import the Git class 
like this...

from buildbot.steps.source.git import Git

...but I don't have a git module under source:

 >>> from buildbot.steps import source
 >>> dir(source)
['BK', 'BuildSlaveTooOldError', 'Bzr', 'CVS', 'Darcs', 'Git', 
'LoggedRemoteCommand', 'LoggingBuildStep', 'Mercurial', 'P4', 'P4Sync', 
'Repo', 'SKIPPED', 'SVN', 'Source', '__builtins__', '__doc__', 
'__file__', '__name__', '__package__', 'formatdate', 'log', 'warn']
 >>>

I must not have noticed that discrepancy when I was reading the docs. I 
do have the git.py file; it's at 
/usr/local/lib/python2.7/site-packages/buildslave/commands/git.py. I 
think it's probably an easy fix and I'm just calling the class 
instantiation incorrectly.

Any ideas?

Thanks for your help,

Brett M Ingalls



TRACEBACK
=========
$ buildbot stop . && buildbot start .
buildbot process 80562 is dead
Following twistd.log until startup finished..
2011-11-08 17:45:28-0800 [-] Log opened.
2011-11-08 17:45:28-0800 [-] twistd 11.0.0 (/usr/local/bin/2.7 2.7.2) 
starting up.
2011-11-08 17:45:28-0800 [-] reactor class: 
twisted.internet.selectreactor.SelectReactor.
2011-11-08 17:45:28-0800 [-] Creating BuildMaster -- buildbot.version: 
0.8.3p1
2011-11-08 17:45:28-0800 [-] loading configuration from 
/usr/local/buildmaster/bmi/master.cfg
2011-11-08 17:45:28-0800 [-] error while parsing config file
2011-11-08 17:45:28-0800 [-] error during loadConfig
2011-11-08 17:45:28-0800 [-] Unhandled Error
	Traceback (most recent call last):
	  File 
"/usr/local/lib/python2.7/site-packages/twisted/scripts/_twistd_unix.py", line 
323, in startApplication
	    app.startApplication(application, not self.config['no_save'])
	  File 
"/usr/local/lib/python2.7/site-packages/twisted/application/app.py", 
line 644, in startApplication
	    service.IService(application).startService()
	  File 
"/usr/local/lib/python2.7/site-packages/twisted/application/service.py", 
line 277, in startService
	    service.startService()
	  File "/usr/local/lib/python2.7/site-packages/buildbot/master.py", 
line 670, in startService
	    self.loadTheConfigFile()
	--- <exception caught here> ---
	  File "/usr/local/lib/python2.7/site-packages/buildbot/master.py", 
line 703, in loadTheConfigFile
	    d = self.loadConfig(f)
	  File "/usr/local/lib/python2.7/site-packages/buildbot/master.py", 
line 727, in loadConfig
	    exec f in localDict
	  File "/usr/local/buildmaster/bmi/master.cfg", line 37, in <module>
	    logEnviron=False))
	  File 
"/usr/local/lib/python2.7/site-packages/buildbot/steps/source.py", line 
815, in __init__
	    Source.__init__(self, **kwargs)
	  File 
"/usr/local/lib/python2.7/site-packages/buildbot/steps/source.py", line 
125, in __init__
	    LoggingBuildStep.__init__(self, **kwargs)
	  File 
"/usr/local/lib/python2.7/site-packages/buildbot/process/buildstep.py", 
line 1049, in __init__
	    BuildStep.__init__(self, *args, **kwargs)
	  File 
"/usr/local/lib/python2.7/site-packages/buildbot/process/buildstep.py", 
line 634, in __init__
	    raise TypeError(why)
	exceptions.TypeError: <buildbot.steps.source.Git instance at 
0x804ac03b0>.__init__ got unexpected keyword argument(s) ['logEnviron']





On 2011.11.08 09:01 , Marc-Antoine Ruel wrote:
> What buildbot slave version are you using?
>
> It seems logEnviron is correctly passed on master at HEAD
> https://github.com/buildbot/buildbot/blob/master/slave/buildslave/commands/git.py#L70
>
>
> M-A
>
> Le 7 novembre 2011 23:59,<my_bulk at brettmingalls.com>  a écrit :
>
>> Hello,
>>
>> Is there a way to disable printing environment information to the web
>> page that shows stdio for a git build step?
>>
>> I set the logEnviron to False for my shell steps and they're fine, but
>> it doesn't look like the git steps have that parameter.
>>
>> I don't have authentication setup for those pages and I'd rather not
>> print that stuff where the whole world can see. Is there some way to
>> suppress the environment info but still show what went wrong if the
>> checkout fails for some reason?
>>
>> Thanks,
>>
>> Brett
>>
>>
>> ------------------------------------------------------------------------------
>> RSA(R) Conference 2012
>> Save $700 by Nov 18
>> Register now
>> http://p.sf.net/sfu/rsa-sfdev2dev1
>> _______________________________________________
>> 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