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/10/12 17:11:15 UTC
[GitHub] [superset] hughhhh opened a new pull request, #21787: chore: stop logging "SyntaxError" as exceptions
hughhhh opened a new pull request, #21787:
URL: https://github.com/apache/superset/pull/21787
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
Moving exception logs to upper level `command.py` file since we are doing filtering of Syntax errors there. The goals is not to log users errors on our end. This PR will be an example for other errors that we might not want to log as exceptions.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### 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] betodealmeida commented on a diff in pull request #21787: chore: stop logging "SyntaxError" as exceptions
Posted by GitBox <gi...@apache.org>.
betodealmeida commented on code in PR #21787:
URL: https://github.com/apache/superset/pull/21787#discussion_r993731430
##########
superset/sql_lab.py:
##########
@@ -313,8 +313,6 @@ def execute_sql_statement( # pylint: disable=too-many-arguments,too-many-statem
if query.status == QueryStatus.STOPPED:
raise SqlLabQueryStoppedException() from ex
- logger.error("Query %d: %s", query.id, type(ex), exc_info=True)
- logger.debug("Query %d: %s", query.id, ex)
Review Comment:
Can we keep the debug? Or does it also show up as exceptions?
##########
superset/sqllab/command.py:
##########
@@ -132,6 +132,7 @@ def run( # pylint: disable=too-many-statements,useless-suppression
) from ex
raise ex
except Exception as ex:
+ logger.error("Query %d: %s", query.id, type(ex), exc_info=True)
Review Comment:
If we need the exception info in general it's better to use `logger.exception`, as it does that automatically:
```suggestion
logger.exception("Query %d: %s", query.id, type(ex))
```
--
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] hughhhh commented on a diff in pull request #21787: chore: stop logging "SyntaxError" as exceptions
Posted by GitBox <gi...@apache.org>.
hughhhh commented on code in PR #21787:
URL: https://github.com/apache/superset/pull/21787#discussion_r993751055
##########
superset/sql_lab.py:
##########
@@ -313,8 +313,6 @@ def execute_sql_statement( # pylint: disable=too-many-arguments,too-many-statem
if query.status == QueryStatus.STOPPED:
raise SqlLabQueryStoppedException() from ex
- logger.error("Query %d: %s", query.id, type(ex), exc_info=True)
- logger.debug("Query %d: %s", query.id, ex)
Review Comment:
naw we end up eating it and converting to a `payload` i'll add it back
--
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 #21787: chore: stop logging "SyntaxError" as exceptions
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #21787:
URL: https://github.com/apache/superset/pull/21787#issuecomment-1276669343
# [Codecov](https://codecov.io/gh/apache/superset/pull/21787?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 [#21787](https://codecov.io/gh/apache/superset/pull/21787?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1c04c0f) into [master](https://codecov.io/gh/apache/superset/commit/8f74e46d45ca94f5656f7b881f1096c16657c829?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8f74e46) will **decrease** coverage by `0.24%`.
> The diff coverage is `0.00%`.
> :exclamation: Current head 1c04c0f differs from pull request most recent head 67e9838. Consider uploading reports for the commit 67e9838 to get more accurate results
```diff
@@ Coverage Diff @@
## master #21787 +/- ##
==========================================
- Coverage 66.86% 66.61% -0.25%
==========================================
Files 1803 1803
Lines 68996 68995 -1
Branches 7349 7349
==========================================
- Hits 46132 45962 -170
- Misses 20971 21140 +169
Partials 1893 1893
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `78.24% <0.00%> (-0.01%)` | :arrow_down: |
| postgres | `?` | |
| presto | `?` | |
| python | `80.95% <0.00%> (-0.51%)` | :arrow_down: |
| sqlite | `?` | |
| unit | `51.05% <0.00%> (+<0.01%)` | :arrow_up: |
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/21787?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [superset/sql\_lab.py](https://codecov.io/gh/apache/superset/pull/21787/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-c3VwZXJzZXQvc3FsX2xhYi5weQ==) | `82.06% <ø> (-0.14%)` | :arrow_down: |
| [superset/sqllab/command.py](https://codecov.io/gh/apache/superset/pull/21787/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-c3VwZXJzZXQvc3FsbGFiL2NvbW1hbmQucHk=) | `84.55% <0.00%> (-0.70%)` | :arrow_down: |
| [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/21787/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-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.19%)` | :arrow_down: |
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/21787/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-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/sql\_validators/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/21787/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-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvX19pbml0X18ucHk=) | `80.00% <0.00%> (-20.00%)` | :arrow_down: |
| [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/21787/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-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `71.14% <0.00%> (-16.21%)` | :arrow_down: |
| [superset/sqllab/sql\_json\_executer.py](https://codecov.io/gh/apache/superset/pull/21787/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-c3VwZXJzZXQvc3FsbGFiL3NxbF9qc29uX2V4ZWN1dGVyLnB5) | `64.63% <0.00%> (-9.76%)` | :arrow_down: |
| [superset/sqllab/execution\_context\_convertor.py](https://codecov.io/gh/apache/superset/pull/21787/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-c3VwZXJzZXQvc3FsbGFiL2V4ZWN1dGlvbl9jb250ZXh0X2NvbnZlcnRvci5weQ==) | `81.48% <0.00%> (-7.41%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/21787/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-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `89.28% <0.00%> (-7.15%)` | :arrow_down: |
| [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/superset/pull/21787/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-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `89.83% <0.00%> (-6.78%)` | :arrow_down: |
| ... and [16 more](https://codecov.io/gh/apache/superset/pull/21787/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) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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
[GitHub] [superset] hughhhh merged pull request #21787: chore: stop logging "SyntaxError" as exceptions
Posted by GitBox <gi...@apache.org>.
hughhhh merged PR #21787:
URL: https://github.com/apache/superset/pull/21787
--
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