-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
query_runner -> query_results: improve logging, handle unhandled data types #6905
base: master
Are you sure you want to change the base?
Conversation
What type of data source is it trying to use when this happens, and which version of Redash is it happening on? 😄 |
@justinclift this is a version from master |
@AndrewChubatiuk Ahhh. Do you want to take a look at it then? You've probably been doing stuff with that part of things recently, whereas I haven't (yet). 😄 |
@justinclift that's from QueryResults data source |
Hello @justinclift @AndrewChubatiuk Please review this change. Thank you! |
LGTM |
Co-authored-by: Andrii Chubatiuk <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6905 +/- ##
=======================================
Coverage 63.76% 63.77%
=======================================
Files 161 161
Lines 13085 13089 +4
Branches 1812 1814 +2
=======================================
+ Hits 8344 8347 +3
Misses 4438 4438
- Partials 303 304 +1
|
hey @justinclift @AndrewChubatiuk |
@@ -134,6 +137,7 @@ def create_table(connection, table_name, query_results): | |||
column_list=column_list, | |||
place_holders=",".join(["?"] * len(columns)), | |||
) | |||
logger.debug("INSERT template: %s", insert_template) |
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.
Pretty sure we don't want debugging statements being unconditionally run. At least with the change above it, it seems to be done conditionally there.
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.
@justinclift thank you for the reply! So there are 2 things:
logger
only logs (prints to stdout/stderr) messages, nothing is actually run/executed. The default log level is INFO, sologger.debug
is actually a condition which logs the data only at a more verbose level- for another added logger there is a condition that checks the current log level and prevents going through too many checks unless its DEBUG (which is not default)
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.
ping @justinclift
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.
@vtatarin Sorry, but I'm short on time for the next few weeks.
Am getting some (Redash related) stuff deployed to a data centre, and that's taking the majority of my focus time. When that's done I'll be able to look at PRs properly. 😄
What type of PR is this?
Description
Values:
How is this tested?
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings (if there are UI changes)