Closed
Bug 719261
Opened 12 years ago
Closed 12 years ago
Add more logging to AggregatingScheduler
Categories
(Release Engineering :: General, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: rail, Assigned: rail)
Details
Attachments
(1 file, 2 obsolete files)
4.83 KB,
patch
|
catlee
:
review+
rail
:
checked-in+
|
Details | Diff | Splinter Review |
It would be great to print some information about scheduled builders, initialization, etc.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #589742 -
Flags: feedback?(catlee)
Assignee | ||
Updated•12 years ago
|
Priority: -- → P2
Assignee | ||
Comment 2•12 years ago
|
||
* print schedulerid to simplify debugging * use self.working flag for transactions! :D Hopefully fixes bug 719260 * reset the state to its initial state after creating a buildset * worked as expected in staging
Attachment #589742 -
Attachment is obsolete: true
Attachment #589742 -
Flags: feedback?(catlee)
Attachment #589969 -
Flags: review?(catlee)
Comment 3•12 years ago
|
||
Comment on attachment 589969 [details] [diff] [review] moar logging Review of attachment 589969 [details] [diff] [review]: ----------------------------------------------------------------- ::: scheduler.py @@ +383,5 @@ > for b in self.upstreamBuilders: > if b not in state['remainingBuilders']: > state['remainingBuilders'].append(b) > + log.msg('%s <id=%s>: reloaded' % (self.__class__.__name__, > + self.schedulerid)) I think you should use id(self) here instead of self.schedulerid. Or perhaps log both? The thing we want to know is if two instances of the scheduler are running at the same time. The schedulerid's should be the same, because the schedulers will have the same name. @@ +404,5 @@ > self.set_state(t, state) > > def run(self): > d = self.parent.db.runInteraction(self._run) > return d would it make sense to move the 'if self.working' logic into the run() method instead of _run()? Also, I think adding a callback to d to reset self.working to False is better than setting it at the end of _run(), since exceptions may be raised inside _run() that would prevent self.working to be reset to False.
Attachment #589969 -
Flags: review?(catlee) → review-
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Chris AtLee [:catlee] from comment #3) > I think you should use id(self) here instead of self.schedulerid. Or perhaps > log both? The thing we want to know is if two instances of the scheduler are > running at the same time. The schedulerid's should be the same, because the > schedulers will have the same name. OK. > @@ +404,5 @@ > > self.set_state(t, state) > > > > def run(self): > > d = self.parent.db.runInteraction(self._run) > > return d > > would it make sense to move the 'if self.working' logic into the run() > method instead of _run()? I thought about that, but run() just adds deferred to to the pool and actual execution happens in _run(). > Also, I think adding a callback to d to reset self.working to False is > better than setting it at the end of _run(), since exceptions may be raised > inside _run() that would prevent self.working to be reset to False. Good point. I should reset the state in any case.
Assignee | ||
Comment 5•12 years ago
|
||
* use id(self) * reset self.working in any case intediff: https://gist.github.com/1647790
Attachment #589969 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Attachment #590191 -
Flags: review?(catlee)
Updated•12 years ago
|
Attachment #590191 -
Flags: review?(catlee) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Comment on attachment 590191 [details] [diff] [review] moar logging 2 http://hg.mozilla.org/build/buildbotcustom/rev/53cb872ea338
Attachment #590191 -
Flags: checked-in+
Comment 7•12 years ago
|
||
Merged to production.
Assignee | ||
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Product: mozilla.org → Release Engineering
You need to log in
before you can comment on or make changes to this bug.
Description
•