-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make LoggingThread recover on all errors #106
Conversation
Previously, LoggingThread would recover from any XML-RPC fault, but would stop when any other type of exception was encountered. That is a problem, as it means the worker will permanently give up sending messages to the hub when all kinds of temporary issues occur (e.g. a temporary network disruption between worker and hub). The task underneath may continue running for hours, with all log messages being discarded. Given the nature of this thread, it makes more sense to attempt recovering from *all* kinds of errors, as we should try hard not to lose log messages from a task. Fixes release-engineering#60
ef5bb1d
to
28834d7
Compare
Pull Request Test Coverage Report for Build 122
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
My only worry is that the previous behavior may actually matter in some scenarios where self._running
is never correctly set to False - but an exception to exit the loop is unexpectedly needed. Any reason to think that might be the case?
@rohanpm could you add a test case for this change? otherwise LGTM. |
Yep, coveralls complained that coverage has decreased, I did plan to address that before moving ahead with this. It might give some more insight into Ralph's concern as well. |
Hi @rohanpm, do you plan to continue with this pull request? |
Yes, I think so. Not sure when. |
This still makes sense, but it doesn't look like I'm interested in pushing this forward now. I'll close the PR for cleaner dashboards. Will reopen if I come back to it. |
Previously, LoggingThread would recover from any XML-RPC fault, but would stop when any other type of exception was encountered. That is a problem, as it means the worker will permanently give up sending messages to the hub when all kinds of temporary issues occur (e.g. a temporary network disruption between worker and hub). The task underneath may continue running for hours, with all log messages being discarded. Given the nature of this thread, it makes more sense to attempt recovering from all kinds of errors, as we should try hard not to lose log messages from a task. Fixes release-engineering#60 (This commit is a reimplementation of release-engineering#106)
Previously, LoggingThread would recover from any XML-RPC fault, but would stop when any other type of exception was encountered. That is a problem, as it means the worker will permanently give up sending messages to the hub when all kinds of temporary issues occur (e.g. a temporary network disruption between worker and hub). The task underneath may continue running for hours, with all log messages being discarded. Given the nature of this thread, it makes more sense to attempt recovering from all kinds of errors, as we should try hard not to lose log messages from a task. Fixes release-engineering#60 (This commit is a reimplementation of release-engineering#106)
Previously, LoggingThread would recover from any XML-RPC fault,
but would stop when any other type of exception was encountered.
That is a problem, as it means the worker will permanently give
up sending messages to the hub when all kinds of temporary
issues occur (e.g. a temporary network disruption between worker
and hub). The task underneath may continue running for hours,
with all log messages being discarded.
Given the nature of this thread, it makes more sense to attempt
recovering from all kinds of errors, as we should try hard not
to lose log messages from a task.
Fixes #60