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

fix(sqllab): log exceptions caused by the user as debug and not error #10676

Merged
merged 1 commit into from
Aug 25, 2020

Conversation

nytai
Copy link
Member

@nytai nytai commented Aug 25, 2020

SUMMARY

  • Stop logging exceptions in user queries as errors. These exceptions are expected and we already surface them to the user, there's no need to report them as errors. The existing debug logging should be enough to help developers debug user issues.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TEST PLAN

CI passes

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@@ -183,7 +183,6 @@ def get_sql_results( # pylint: disable=too-many-arguments
log_params=log_params,
)
except Exception as ex: # pylint: disable=broad-except
logger.error("Query %d", query_id)
Copy link
Member Author

@nytai nytai Aug 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem very useful, all that ends up being logged is something like

Query 694: <class 'pymssql.ProgrammingError'>

Which is very noisy and not very useful from a developer perspective.

@nytai nytai marked this pull request as ready for review August 25, 2020 20:40
@nytai nytai requested a review from dpgaspar August 25, 2020 20:41
@nytai nytai changed the title fix: log common exceptions as debug instead of exceptions fix(sqllab): log exceptions caused by the user as debug and not error Aug 25, 2020
@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2020

Codecov Report

Merging #10676 into master will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10676      +/-   ##
==========================================
+ Coverage   64.36%   64.41%   +0.04%     
==========================================
  Files         785      785              
  Lines       36981    36980       -1     
  Branches     3530     3530              
==========================================
+ Hits        23803    23819      +16     
+ Misses      13070    13052      -18     
- Partials      108      109       +1     
Flag Coverage Δ
#cypress 54.83% <ø> (+0.01%) ⬆️
#javascript 60.91% <ø> (ø)
#python 59.77% <ø> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/sql_lab.py 78.69% <ø> (+0.34%) ⬆️
superset-frontend/src/reduxUtils.ts 70.88% <0.00%> (-8.87%) ⬇️
superset-frontend/src/SqlLab/actions/sqlLab.js 62.60% <0.00%> (-1.93%) ⬇️
superset-frontend/src/SqlLab/reducers/sqlLab.js 39.41% <0.00%> (-1.66%) ⬇️
superset/db_engine_specs/presto.py 81.65% <0.00%> (-0.68%) ⬇️
superset/connectors/sqla/models.py 89.72% <0.00%> (+0.13%) ⬆️
superset/views/core.py 74.40% <0.00%> (+0.24%) ⬆️
superset/models/core.py 87.50% <0.00%> (+0.83%) ⬆️
...t-frontend/src/dashboard/actions/dashboardState.js 60.13% <0.00%> (+1.30%) ⬆️
.../src/dashboard/components/gridComponents/Chart.jsx 85.71% <0.00%> (+2.04%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b40d44...a067b51. Read the comment docs.

@nytai nytai merged commit fe574fd into apache:master Aug 25, 2020
@nytai nytai deleted the tai/reduce-exception-noise branch August 25, 2020 21:35
Ofeknielsen pushed a commit to ofekisr/incubator-superset that referenced this pull request Oct 5, 2020
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.38.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 0.38.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants