You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "john-bodley (via GitHub)" <gi...@apache.org> on 2023/04/05 08:42:10 UTC
[GitHub] [superset] john-bodley opened a new pull request, #23585: fix: Handling report + alerts with no data
john-bodley opened a new pull request, #23585:
URL: https://github.com/apache/superset/pull/23585
<!---
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 -->
### 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] john-bodley merged pull request #23585: fix: Ensure the reporting framework handles charts with no data
Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley merged PR #23585:
URL: https://github.com/apache/superset/pull/23585
--
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] john-bodley commented on a diff in pull request #23585: fix: Handling report + alerts with no data
Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on code in PR #23585:
URL: https://github.com/apache/superset/pull/23585#discussion_r1158216144
##########
superset/charts/post_processing.py:
##########
@@ -328,14 +328,19 @@ def apply_post_process(
if query["result_format"] not in (rf.value for rf in ChartDataResultFormat):
raise Exception(f"Result format {query['result_format']} not supported")
- if not query["data"]:
+ data = query["data"]
+
+ if isinstance(data, str):
+ data = data.strip()
Review Comment:
Prevents the `pandas.errors.EmptyDataError: No columns to parse from file` error when `query["data"]` is `\n`—invoked via the`/api/v1/chart/<pk>/data/?format=csv&type=post_processed` endpoint.
--
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 #23585: fix: Ensure the reporting framework handles charts with no data
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #23585:
URL: https://github.com/apache/superset/pull/23585#issuecomment-1497162176
## [Codecov](https://codecov.io/gh/apache/superset/pull/23585?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 [#23585](https://codecov.io/gh/apache/superset/pull/23585?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ae75ce4) into [master](https://codecov.io/gh/apache/superset/commit/9d2f43d312c37c8c6827c2f94de6b5e3e1431014?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9d2f43d) will **decrease** coverage by `11.35%`.
> The diff coverage is `75.00%`.
> :exclamation: Current head ae75ce4 differs from pull request most recent head 9d5953f. Consider uploading reports for the commit 9d5953f to get more accurate results
```diff
@@ Coverage Diff @@
## master #23585 +/- ##
===========================================
- Coverage 67.71% 56.37% -11.35%
===========================================
Files 1916 1916
Lines 74014 74019 +5
Branches 8039 8039
===========================================
- Hits 50122 41729 -8393
- Misses 21843 30241 +8398
Partials 2049 2049
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `?` | |
| postgres | `?` | |
| presto | `52.66% <0.00%> (-0.01%)` | :arrow_down: |
| python | `58.96% <75.00%> (-23.46%)` | :arrow_down: |
| sqlite | `?` | |
| unit | `52.63% <75.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/23585?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/utils/csv.py](https://codecov.io/gh/apache/superset/pull/23585?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvY3N2LnB5) | `46.66% <0.00%> (-51.61%)` | :arrow_down: |
| [superset/charts/post\_processing.py](https://codecov.io/gh/apache/superset/pull/23585?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY2hhcnRzL3Bvc3RfcHJvY2Vzc2luZy5weQ==) | `90.00% <100.00%> (+0.21%)` | :arrow_up: |
... and [301 files with indirect coverage changes](https://codecov.io/gh/apache/superset/pull/23585/indirect-changes?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] john-bodley commented on a diff in pull request #23585: fix: Handling report + alerts with no data
Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on code in PR #23585:
URL: https://github.com/apache/superset/pull/23585#discussion_r1158216144
##########
superset/charts/post_processing.py:
##########
@@ -328,14 +328,19 @@ def apply_post_process(
if query["result_format"] not in (rf.value for rf in ChartDataResultFormat):
raise Exception(f"Result format {query['result_format']} not supported")
- if not query["data"]:
+ data = query["data"]
+
+ if isinstance(data, str):
+ data = data.strip()
Review Comment:
Prevents the `pandas.errors.EmptyDataError: No columns to parse from file` error when `query["data"]` is `\n`—which occurs from the `/api/v1/chart/<pk>/data/?format=csv&type=post_processed` endpoint when the the chart payload contains no data.
--
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