Skip to content
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

this feels more like a warning than error #2406

Merged
merged 1 commit into from
Apr 24, 2018

Conversation

honnix
Copy link
Member

@honnix honnix commented Apr 24, 2018

Description

Log exception as warning when retrying communicating with remote scheduler.

Motivation and Context

Since this happens during retrying, a warning seems to be more suitable.

Have you tested this? If so, how?

Tested it manually.

import logging
from logging import getLogger

logging.basicConfig(level=logging.INFO)
logger = getLogger('test')

try:
    10 / 0
except Exception as exp:
    logger.exception("an error with exception")
    logger.warning("a warning with exception" , exc_info=True)
python test.py
ERROR:test:an error with exception
Traceback (most recent call last):
  File "test.py", line 8, in <module>
    10 / 0
ZeroDivisionError: integer division or modulo by zero
WARNING:test:a warning with exception
Traceback (most recent call last):
  File "test.py", line 8, in <module>
    10 / 0
ZeroDivisionError: integer division or modulo by zero

@dlstadther PTAL Does this make sense?

Since this happens during retrying, a warning seems to be more suitable.
@dlstadther
Copy link
Collaborator

The only time I've received this is when luigid isn't running. Since it isn't running when i expect it to, an exception feels expected. Then again, since the code allows the run to continue, it also makes sense to have the logging be a warning...

@honnix
Copy link
Member Author

honnix commented Apr 24, 2018

We have experienced that when luigid is somehow overloaded, we got ConnectionReset, Timeout, etc. And after a couple of retries, it could recover.

@dlstadther
Copy link
Collaborator

@honnix Then sounds like a valid update. You've got my approval!

@honnix honnix merged commit 498d015 into master Apr 24, 2018
@honnix honnix deleted the log-non-error-exception-as-warning branch April 24, 2018 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants