Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#3009 closed defect (fixed)

MultipleFileUpload fails on relative source paths

Reported by: bgilbert Owned by:
Priority: minor Milestone: 0.9.0
Version: Keywords: simple
Cc:

Description

MultipleFileUpload expects the stat RemoteCommand to interpret paths relative to the workdir. However, stat doesn't understand workdirs, and ignores the workdir argument passed by MultipleFileUpload.

As a result:

  • If a slavesrc is relative to the workdir, the master hits an exception:
Traceback (most recent call last):
  File ".../lib/python2.7/site-packages/twisted/internet/defer.py", line 382, in callback
    self._startRunCallbacks(result)
  File ".../lib/python2.7/site-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks
    self._runCallbacks()
  File ".../lib/python2.7/site-packages/twisted/internet/defer.py", line 577, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File ".../lib/python2.7/site-packages/twisted/internet/defer.py", line 1155, in gotResult
    _inlineCallbacks(r, g, deferred)
--- <exception caught here> ---
  File ".../lib/python2.7/site-packages/twisted/internet/defer.py", line 1097, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File ".../lib/python2.7/site-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File ".../lib/python2.7/site-packages/buildbot/steps/transfer.py", line 482, in uploadSources
    result = yield self.startUpload(source, masterdest)
  File ".../lib/python2.7/site-packages/twisted/internet/defer.py", line 577, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File ".../lib/python2.7/site-packages/buildbot/steps/transfer.py", line 440, in checkStat
    s = cmd.updates['stat'][-1]
exceptions.KeyError: 'stat'
  • If a slavesrc is relative to the builder's basedir, the MultipleFileUpload fails.

The workaround is to set the step's workdir to the empty string and specify slavesrc paths relative to the builder's basedir.

Change History (8)

comment:1 Changed 5 years ago by dustin

  • Keywords simple added
  • Milestone changed from undecided to 0.9.0

comment:2 Changed 5 years ago by sa2ajj

Looks like we have another user with the same problem: IRC.

comment:3 Changed 5 years ago by dustin

So it sounds like we need to either explicitly include the workdir in the path passed to the slave, or use an absolute path.

I'd be worried about compatibility, though - are there cases where this will work now, which might break with this change?

comment:4 Changed 5 years ago by dustin

  • Version 0.8.9 deleted

comment:5 Changed 5 years ago by sa2ajj

comment:6 Changed 4 years ago by skelly

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

Marking as fixed because pull request got merged. Note this is a problem in 0.8.12, however, I think this may have been an issue from the very beginning so affects 0.8.9 through 0.8.12.

comment:7 Changed 4 years ago by sa2ajj

And GH:1835 for 0.8.x

comment:8 Changed 4 years ago by sa2ajj

And now it's landed to eight as well.

Note: See TracTickets for help on using tickets.