-
Notifications
You must be signed in to change notification settings - Fork 106
PECOBLR-86 improve logging on python driver #556
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
base: main
Are you sure you want to change the base?
Conversation
Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase ( |
src/databricks/sql/client.py
Outdated
@@ -214,6 +214,8 @@ def read(self) -> Optional[OAuthToken]: | |||
# use_cloud_fetch | |||
# Enable use of cloud fetch to extract large query results in parallel via cloud storage | |||
|
|||
logger.debug(f"Connection.__init__(server_hostname={server_hostname}, http_path={http_path})") |
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.
try to use lazy logging
src/databricks/sql/thrift_backend.py
Outdated
@@ -390,6 +392,8 @@ def attempt_request(attempt): | |||
|
|||
# TODO: don't use exception handling for GOS polling... | |||
|
|||
logger.debug(f"ThriftBackend.attempt_request: HTTPError: {err}") |
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.
When handling an error, try to log error and not debug
src/databricks/sql/thrift_backend.py
Outdated
@@ -404,6 +408,7 @@ def attempt_request(attempt): | |||
else: | |||
raise err | |||
except OSError as err: | |||
logger.debug(f"ThriftBackend.attempt_request: OSError: {err}") |
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.
same, for error cases preferrable to use logger.error
can you look into the failing tests as well |
Also can you update the PR description |
Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase ( |
2485a22
to
0b04de7
Compare
Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase ( |
Signed-off-by: Sai Shree Pradhan <[email protected]>
Signed-off-by: Sai Shree Pradhan <[email protected]>
Signed-off-by: Sai Shree Pradhan <[email protected]>
0b04de7
to
0adfedd
Compare
Signed-off-by: Sai Shree Pradhan <[email protected]>
Signed-off-by: Sai Shree Pradhan <[email protected]>
What type of PR is this?
Description
Improve logging on python driver
How is this tested?
Related Tickets & Documents
PECOBLR-86