Ticket #210 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

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

Reported by: gward Owned by: dustin
Priority: major Milestone: 0.7.10
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 Download (1.7 KB) - added by gward 5 years ago.
Patch with test case

Change History

Changed 5 years ago by gward

Patch with test case

comment:1 Changed 5 years ago 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).

comment:2 Changed 5 years ago by warner

  • Owner set to warner
  • Status changed from new to assigned
  • Milestone changed from undecided to 0.7.8

sounds good

comment:3 Changed 4 years ago by dustin

  • Owner changed from warner to dustin
  • Status changed from assigned to new
  • Milestone changed from 0.8.0 to 0.7.10

Let's get this in; unfortunately, this doesn't apply anymore.

comment:4 Changed 4 years ago by gward

Dustin -- did you try applying my patches in #209 first? The patch in this ticket depends on them.

comment:5 Changed 4 years ago by dustin

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

Sorry, I missed that!

commit 265265830c19967b545cea2193195af1759add6d
Author: Greg Ward <gerg.ward+buildbot@gmail.com>
Date:   Tue Feb 3 11:06:25 2009 -0500

    (refs #210) render properties to FileUpload and FileDownload's workdir (patch updated by djmitche)
Note: See TracTickets for help on using tickets.