You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/06/03 00:23:30 UTC

[GitHub] [superset] eschutho opened a new pull request, #20252: chore: use exc_info to pass errors to log warnings

eschutho opened a new pull request, #20252:
URL: https://github.com/apache/superset/pull/20252

   ### SUMMARY
   After looking at our logs, I'm not seeing any exception information being passed through when written `logger.warning(ex)` so I'm updating all of these loggers to use `exc_info=True` instead. 
   
   https://docs.python.org/3/library/logging.html#logging.Logger.debug
   By passing `True` we get the results of sys.exc_info https://docs.python.org/3/library/sys.html#sys.exc_info
   We could alternatively pass the exception explicitly. 
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] eschutho merged pull request #20252: chore: use exc_info to pass errors to log warnings

Posted by GitBox <gi...@apache.org>.
eschutho merged PR #20252:
URL: https://github.com/apache/superset/pull/20252


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] betodealmeida commented on a diff in pull request #20252: chore: use exc_info to pass errors to log warnings

Posted by GitBox <gi...@apache.org>.
betodealmeida commented on code in PR #20252:
URL: https://github.com/apache/superset/pull/20252#discussion_r888516804


##########
superset/views/base.py:
##########
@@ -446,7 +446,7 @@ def show_http_exception(ex: HTTPException) -> FlaskResponse:
 # or SupersetErrorsException, with a specific status code and error type
 @superset_app.errorhandler(CommandException)
 def show_command_errors(ex: CommandException) -> FlaskResponse:
-    logger.warning(ex)
+    logger.warning("Command Exception", exc_info=True)

Review Comment:
   Same here:
   
   ```suggestion
       logger.warning("CommandException", exc_info=True)
   ```



##########
superset/views/base.py:
##########
@@ -420,7 +420,7 @@ def refresh_csrf_token(ex: CSRFError) -> FlaskResponse:
 
 @superset_app.errorhandler(HTTPException)
 def show_http_exception(ex: HTTPException) -> FlaskResponse:
-    logger.warning(ex)
+    logger.warning("HTTP Exception", exc_info=True)

Review Comment:
   Nit, for consistency I'd leave this as `HTTPException`, similar to how you did `SupersetErrorsException` — might be easier to grep.
   
   ```suggestion
       logger.warning("HTTPException", exc_info=True)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #20252: chore: use exc_info to pass errors to log warnings

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #20252:
URL: https://github.com/apache/superset/pull/20252#issuecomment-1146147727

   # [Codecov](https://codecov.io/gh/apache/superset/pull/20252?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#20252](https://codecov.io/gh/apache/superset/pull/20252?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3d74525) into [master](https://codecov.io/gh/apache/superset/commit/74c5479926d89cebe5bad193123d8ecaff65f360?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (74c5479) will **decrease** coverage by `0.10%`.
   > The diff coverage is `72.10%`.
   
   > :exclamation: Current head 3d74525 differs from pull request most recent head c99aaff. Consider uploading reports for the commit c99aaff to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #20252      +/-   ##
   ==========================================
   - Coverage   66.47%   66.36%   -0.11%     
   ==========================================
     Files        1726     1726              
     Lines       64767    64886     +119     
     Branches     6828     6832       +4     
   ==========================================
   + Hits        43055    43063       +8     
   - Misses      19977    20091     +114     
   + Partials     1735     1732       -3     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `53.66% <38.51%> (-0.04%)` | :arrow_down: |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `53.52% <38.51%> (-0.04%)` | :arrow_down: |
   | python | `82.38% <86.76%> (-0.28%)` | :arrow_down: |
   | sqlite | `82.02% <86.76%> (?)` | |
   | unit | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/20252?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../shared-controls/components/RadioButtonControl.tsx](https://codecov.io/gh/apache/superset/pull/20252/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY2hhcnQtY29udHJvbHMvc3JjL3NoYXJlZC1jb250cm9scy9jb21wb25lbnRzL1JhZGlvQnV0dG9uQ29udHJvbC50c3g=) | `0.00% <ø> (ø)` | |
   | [...ackages/superset-ui-core/src/utils/featureFlags.ts](https://codecov.io/gh/apache/superset/pull/20252/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvdXRpbHMvZmVhdHVyZUZsYWdzLnRz) | `100.00% <ø> (ø)` | |
   | [...gins/legacy-plugin-chart-world-map/src/WorldMap.js](https://codecov.io/gh/apache/superset/pull/20252/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LXdvcmxkLW1hcC9zcmMvV29ybGRNYXAuanM=) | `0.00% <0.00%> (ø)` | |
   | [.../legacy-plugin-chart-world-map/src/controlPanel.ts](https://codecov.io/gh/apache/superset/pull/20252/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LXdvcmxkLW1hcC9zcmMvY29udHJvbFBhbmVsLnRz) | `33.33% <0.00%> (-66.67%)` | :arrow_down: |
   | [...egacy-plugin-chart-world-map/src/transformProps.js](https://codecov.io/gh/apache/superset/pull/20252/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcGx1Z2luLWNoYXJ0LXdvcmxkLW1hcC9zcmMvdHJhbnNmb3JtUHJvcHMuanM=) | `0.00% <0.00%> (ø)` | |
   | [superset-frontend/src/SqlLab/reducers/sqlLab.js](https://codecov.io/gh/apache/superset/pull/20252/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9yZWR1Y2Vycy9zcWxMYWIuanM=) | `32.62% <0.00%> (-0.54%)` | :arrow_down: |
   | [...tend/src/components/Datasource/DatasourceModal.tsx](https://codecov.io/gh/apache/superset/pull/20252/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRGF0YXNvdXJjZS9EYXRhc291cmNlTW9kYWwudHN4) | `69.04% <ø> (ø)` | |
   | [.../src/dashboard/components/gridComponents/Chart.jsx](https://codecov.io/gh/apache/superset/pull/20252/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0NoYXJ0LmpzeA==) | `60.60% <ø> (ø)` | |
   | [...set-frontend/src/explore/actions/exploreActions.ts](https://codecov.io/gh/apache/superset/pull/20252/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvYWN0aW9ucy9leHBsb3JlQWN0aW9ucy50cw==) | `50.00% <ø> (ø)` | |
   | [...mponents/DataTablesPane/components/ResultsPane.tsx](https://codecov.io/gh/apache/superset/pull/20252/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9EYXRhVGFibGVzUGFuZS9jb21wb25lbnRzL1Jlc3VsdHNQYW5lLnRzeA==) | `58.18% <ø> (-0.75%)` | :arrow_down: |
   | ... and [94 more](https://codecov.io/gh/apache/superset/pull/20252/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/20252?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/20252?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [74c5479...c99aaff](https://codecov.io/gh/apache/superset/pull/20252?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org