Skip to content

Commit

Permalink
remove some TODOs, use log.err instead of print
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Mar 8, 2011
1 parent 2c12d32 commit 6b7aa5c
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions master/buildbot/process/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,7 @@ def attached(self, slave, remote, commands):
# for C.
#
# Therefore, when we see that we're already attached, we can
# just ignore it. TODO: build a diagram of the state
# transitions here, I'm concerned about sb.attached() failing
# and leaving sb.state stuck at 'ATTACHING', and about
# the detached() message arriving while there's some
# transition pending such that the response to the transition
# re-vivifies sb
# just ignore it.
return defer.succeed(self)

sb = slavebuilder.SlaveBuilder()
Expand All @@ -474,7 +469,6 @@ def attached(self, slave, remote, commands):
return d

def _attached(self, sb):
# TODO: make this .addSlaveEvent(slave.slavename, ['connect']) ?
self.builder_status.addPointEvent(['connect', sb.slave.slavename])
self.attaching_slaves.remove(sb)
self.slaves.append(sb)
Expand All @@ -484,10 +478,9 @@ def _attached(self, sb):

def _not_attached(self, why, slave):
# already log.err'ed by SlaveBuilder._attachFailure
# TODO: make this .addSlaveEvent?
# TODO: remove from self.slaves (except that detached() should get
# run first, right?)
print why
log.err(why, 'slave failed to attach')
self.builder_status.addPointEvent(['failed', 'connect',
slave.slavename])
# TODO: add an HTMLLogFile of the exception
Expand All @@ -509,17 +502,13 @@ def detached(self, slave):
# the Build's .lostRemote method (invoked by a notifyOnDisconnect
# handler) will cause the Build to be stopped, probably right
# after the notifyOnDisconnect that invoked us finishes running.

# TODO: should failover to a new Build
#self.retryBuild(sb.build)
pass

if sb in self.attaching_slaves:
self.attaching_slaves.remove(sb)
if sb in self.slaves:
self.slaves.remove(sb)

# TODO: make this .addSlaveEvent?
self.builder_status.addPointEvent(['disconnect', slave.slavename])
sb.detached() # inform the SlaveBuilder that their slave went away
self.updateBigStatus()
Expand Down

0 comments on commit 6b7aa5c

Please sign in to comment.