[users at bb.net] StopIteration Exceptions in LineConsumerLogObserver
Yngve N. Pettersen
yngve at vivaldi.com
Wed Jan 13 16:52:51 UTC 2021
Hi,
We are using a class based on steps.ShellCommandNewStyle to process log
output using LineConsumerLogObserver from a number of tests.
After the v2.10 upgrade (from v2.7) I have noticed several cases of
Exceptions being thrown and being registered as such in the Build status
information. One such case, missing handling of GeneratorExit, has been
fixed.
But today a lot of these test runs started failing (next on todo list is
finding out why), and was reported terminated due to an exception.
The exception turns out to be due to a StopIteration from
LineConsumerLogObserver.headerLineReceived (at least in the case I
investigated). My guess is that the "problem line" is one of the two last
lines in the log, which reports the exit status of the task.
The log handler function is written like the logConsumer function in
<http://docs.buildbot.net/current/developer/cls-logobserver.html#buildbot.process.logobserver.LineConsumerLogObserver>
Based on what I've quickly skimmed about StopIteration, it should be
handled by the caller of the logConsumer function. This suggests that
LineConsumerLogObserver or its caller need to be updated.
BTW, this is not new in v2.10, this exception also happened in v2.7 based
on my grep of the log files. I guess the reason it is now showing up as an
issue is that these exceptions are reported upwards to the step.
--
Sincerely,
Yngve N. Pettersen
Vivaldi Technologies AS
More information about the users
mailing list