You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "zephyring (via GitHub)" <gi...@apache.org> on 2023/07/20 22:49:23 UTC
[GitHub] [superset] zephyring opened a new pull request, #24758: chore(view_api): returning application/json content-type for all methods under …
zephyring opened a new pull request, #24758:
URL: https://github.com/apache/superset/pull/24758
…views/api
<!---
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 -->
1. inherit BaseSupersetApi for superset.views.api class
2. change all methods to use the parent response method to inherit goodies such as response content-type `application/json`
### 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] codecov[bot] commented on pull request #24758: chore(view_api): returning application/json content-type for all methods under …
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #24758:
URL: https://github.com/apache/superset/pull/24758#issuecomment-1644752797
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/24758?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#24758](https://app.codecov.io/gh/apache/superset/pull/24758?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (07d19a1) into [master](https://app.codecov.io/gh/apache/superset/commit/7675e0db10f42dbb76f908e9bc70906da204c98d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (7675e0d) will **decrease** coverage by `10.70%`.
> The diff coverage is `42.85%`.
> :exclamation: Current head 07d19a1 differs from pull request most recent head 9b1b06d. Consider uploading reports for the commit 9b1b06d to get more accurate results
```diff
@@ Coverage Diff @@
## master #24758 +/- ##
===========================================
- Coverage 68.94% 58.25% -10.70%
===========================================
Files 1901 1901
Lines 73898 73898
Branches 8175 8175
===========================================
- Hits 50951 43047 -7904
- Misses 20834 28738 +7904
Partials 2113 2113
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `?` | |
| postgres | `?` | |
| presto | `54.06% <42.85%> (+<0.01%)` | :arrow_up: |
| python | `60.95% <42.85%> (-22.38%)` | :arrow_down: |
| sqlite | `?` | |
| unit | `54.94% <42.85%> (+<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=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://app.codecov.io/gh/apache/superset/pull/24758?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [superset/views/api.py](https://app.codecov.io/gh/apache/superset/pull/24758?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvdmlld3MvYXBpLnB5) | `62.50% <42.85%> (-6.25%)` | :arrow_down: |
... and [292 files with indirect coverage changes](https://app.codecov.io/gh/apache/superset/pull/24758/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
: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=apache)
--
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 #24758: chore(view_api): return application/json as content-type for api/v1/form_data endpoint
Posted by "eschutho (via GitHub)" <gi...@apache.org>.
eschutho merged PR #24758:
URL: https://github.com/apache/superset/pull/24758
--
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 commented on a diff in pull request #24758: chore(view_api): return application/json as content-type for api/v1/form_data endpoint
Posted by "eschutho (via GitHub)" <gi...@apache.org>.
eschutho commented on code in PR #24758:
URL: https://github.com/apache/superset/pull/24758#discussion_r1271132373
##########
superset/views/api.py:
##########
@@ -86,7 +86,7 @@ def query_form_data(self) -> FlaskResponse: # pylint: disable=no-self-use
update_time_range(form_data)
- return json.dumps(form_data)
+ return self.json_response(form_data)
Review Comment:
nice!
--
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