[Buildbot-devel] 0.8.0 branch.. p4 syncing for triggered builds fails everytime, forced builds work..

Bill Deegan bill at baddogconsulting.com
Thu May 20 19:11:09 UTC 2010


All,

Just sent a pull request with this change in it.
diff --git a/buildbot/slave/commands/vcs.py b/buildbot/slave/commands/vcs.py
index 3b43804..64ea50f 100644
--- a/buildbot/slave/commands/vcs.py
+++ b/buildbot/slave/commands/vcs.py
@@ -1,4 +1,4 @@
-import os, re, sys, shutil, time
+import os, re, sys, shutil, time, unicodedata

 from xml.dom.minidom import parseString

@@ -1823,6 +1823,10 @@ class P4(P4Base):
             command.extend(['-P', Obfuscated(self.p4passwd, "XXXXXXXX")])
         command.extend(['client', '-i'])
         log.msg(client_spec)
+
+        # Clean client spec to plain ascii
+        client_spec=unicodedata.normalize('NFKD',client_spec).encode('ascii','ignore')
+
         c = ShellCommand(self.builder, command, self.builder.basedir,
                          environ=env, sendRC=False, timeout=self.timeout,
                          maxTime=self.maxTime, initialStdin=client_spec,


-Bill

On Thu, May 20, 2010 at 9:14 AM, Bill Deegan <bill at baddogconsulting.com> wrote:
> Chris,
>
> On Thu, May 20, 2010 at 7:14 AM, Chris AtLee <chris at atlee.ca> wrote:
>> Exactly which version of buildbot are you using?
>
> The latest from djmitche/buildbot on the 0.8.0 branch.
>
>> A change was landed this week to handle some unicode encoding issues
>> on the slave.  I think this would have shown up in the 0.8.0 branch as
>> of http://github.com/djmitche/buildbot/commit/56fc5af81485c39fc2f374d371b69f31a9d0cc00
>>
>> Most likely stdin isn't getting encoded in the same way as the command
>> is.  Looking at the P4 code, it looks like maybe one of your
>> parameters to P4 is unicode, and therefore the client_spec sent to the
>> p4 executable is a unicode object.
> All the parameters should be plain ascii.
> I assume you're talking about the p4port,p4user,p4client,etc.
> http://djmitche.github.com/buildbot/docs/latest/P4.html#P4
>
> I'm not sure how that would explain that the force build button works fine?
> It seems to just be an issue with the p4poller starting a build.
> -Bill
>
>>
>> On Wed, May 19, 2010 at 11:04 PM, Bill Deegan <bill at baddogconsulting.com> wrote:
>>> On Wed, May 19, 2010 at 4:53 PM, Bill Deegan <bill at baddogconsulting.com> wrote:
>>>> See subject.
>>>>
>>>> Here's the error message:
>>>> Error in client specification.
>>>> Error detected at line 1.
>>>> Syntax error in 'C'.
>>>>
>>>> It fails while setting up the client.
>>>> I've looked at the twisted.log on the client and the client specs look the same.
>>>>
>>>> Arg.. This is since I've upgraded from 0.7.x to 0.8.0rc*
>>>
>>>
>>> More info. On my Linux client i get this stack trace when it's trying
>>> to reset the clientspec.
>>> 2010-05-19 19:06:50-0700 [-] Unhandled Error
>>>        Traceback (most recent call last):
>>>          File "/tools/linux-ia32/python/python/2.5.4/lib/python2.5/site-packages/buildbot-latest-py2.5.egg/buildbot/slave/commands/vcs.py",
>>> line 1832, in doVCFull
>>>            d = c.start()
>>>          File "/tools/linux-ia32/python/python/2.5.4/lib/python2.5/site-packages/buildbot-latest-py2.5.egg/buildbot/slave/commands/base.py",
>>> line 400, in start
>>>            self._startCommand()
>>>          File "/tools/linux-ia32/python/python/2.5.4/lib/python2.5/site-packages/buildbot-latest-py2.5.egg/buildbot/slave/commands/base.py",
>>> line 528, in _startCommand
>>>            usePTY=self.usePTY)
>>>          File "/tools/linux-ia32/python/python/2.5.4/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/internet/posixbase.py",
>>> line 224, in spawnProcess
>>>            processProtocol, uid, gid, childFDs)
>>>        --- <exception caught here> ---
>>>          File "/tools/linux-ia32/python/python/2.5.4/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/internet/process.py",
>>> line 566, in __init__
>>>            self.proto.makeConnection(self)
>>>          File "/tools/linux-ia32/python/python/2.5.4/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/internet/protocol.py",
>>> line 349, in makeConnection
>>>            self.connectionMade()
>>>          File "/tools/linux-ia32/python/python/2.5.4/lib/python2.5/site-packages/buildbot-latest-py2.5.egg/buildbot/slave/commands/base.py",
>>> line 147, in connectionMade
>>>            self.transport.write(self.pending_stdin)
>>>          File "/tools/linux-ia32/python/python/2.5.4/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/internet/process.py",
>>> line 722, in write
>>>            self.pipes[0].write(data)
>>>          File "/tools/linux-ia32/python/python/2.5.4/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/internet/process.py",
>>> line 159, in write
>>>            abstract.FileDescriptor.write(self, data)
>>>          File "/tools/linux-ia32/python/python/2.5.4/lib/python2.5/site-packages/Twisted-8.2.0-py2.5-linux-i686.egg/twisted/internet/abstract.py",
>>> line 170, in write
>>>            raise TypeError("Data must not be unicode")
>>>        exceptions.TypeError: Data must not be unicode
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> 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