Ticket #210 (assigned defect)

Opened 8 months ago

Last modified 7 months ago

FileUpload/FileDownload blow up if 'workdir' is a WithProperties object

Reported by: gward Assigned to: warner (accepted)
Priority: major Milestone: 0.8.0
Component: other Version: 0.7.6
Keywords: Cc:

Description

Certain BuildSteps (well, ShellCommand at least, thanks to ticket #43) allow you pass a WithProperties object as workdir. FileUpload and FileDownload do not.

Here's my example:

workdir = shell.WithProperties("build.%s", "buildnumber")
...
f2 = factory.BuildFactory()
f2.addStep(transfer.FileUpload(
    slavesrc="file",
    masterdest="uploaded-file",
    workdir=workdir,
    ))

When I run the build in question, the upload step dies with this exception:

Traceback from remote host -- Traceback (most recent call last):
  File "/usr/local/Intelerad/3rd_Party/python-2.5/lib/python2.5/site-packages/twisted/spread/pb.py", line 847, in _recvMessage
    netResult = object.remoteMessageReceived(self, message, netArgs, netKw)
  File "/usr/local/Intelerad/3rd_Party/python-2.5/lib/python2.5/site-packages/twisted/spread/flavors.py", line 119, in remoteMessageReceived
    state = method(*args, **kw)
  File "/home/gward/lib/python/buildbot/slave/bot.py", line 171, in remote_startCommand
    d = self.command.doStart()
  File "/home/gward/src/buildbot/buildbot/slave/commands.py", line 629, in doStart
    d = defer.maybeDeferred(self.start)
--- <exception caught here> ---
  File "/usr/local/Intelerad/3rd_Party/python-2.5/lib/python2.5/site-packages/twisted/internet/defer.py", line 107, in maybeDeferred
    result = f(*args, **kw)
  File "/home/gward/src/buildbot/buildbot/slave/commands.py", line 716, in start
    os.path.expanduser(self.filename))
  File "/var/tmp/python2.5-intelerad-2.5.1-root/usr/local/Intelerad/3rd_Party/python-2.5/lib/python2.5/posixpath.py", line 60, in join
    if b.startswith('/'):
exceptions.AttributeError: Unpersistable instance has no attribute 'startswith'

Attachments

bb-bug210.patch (1.7 kB) - added by gward on 03/25/08 12:04:47.
Patch with test case

Change History

03/25/08 12:04:47 changed by gward

  • attachment bb-bug210.patch added.

Patch with test case

03/25/08 12:09:38 changed by gward

The above patch works for me. It depends on my patches for bug #115 (already merged to Buildbot trunk) and #209 (not yet merged).

I think this patch will apply cleanly to (trunk + bug #209).

04/28/08 15:41:28 changed by warner

  • owner set to warner.
  • status changed from new to assigned.
  • milestone changed from undecided to 0.7.8.

sounds good