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

chore(view_api): return application/json as content-type for api/v1/form_data endpoint #24758

Merged

Conversation

zephyring
Copy link
Contributor

@zephyring zephyring commented Jul 20, 2023

…views/api

SUMMARY

  1. return content-type application/json for api/v1/form_data endpoint.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Merging #24758 (2f089be) into master (7675e0d) will increase coverage by 0.00%.
The diff coverage is 58.69%.

❗ Current head 2f089be differs from pull request most recent head ee855db. Consider uploading reports for the commit ee855db to get more accurate results

@@           Coverage Diff           @@
##           master   #24758   +/-   ##
=======================================
  Coverage   68.94%   68.95%           
=======================================
  Files        1901     1902    +1     
  Lines       73898    73939   +41     
  Branches     8175     8176    +1     
=======================================
+ Hits        50951    50981   +30     
- Misses      20834    20845   +11     
  Partials     2113     2113           
Flag Coverage Δ
hive 54.14% <17.85%> (-0.03%) ⬇️
mysql 79.19% <46.42%> (-0.01%) ⬇️
postgres 79.29% <46.42%> (-0.01%) ⬇️
presto 54.03% <17.85%> (-0.03%) ⬇️
python 83.35% <85.71%> (+0.02%) ⬆️
sqlite 77.86% <46.42%> (-0.01%) ⬇️
unit 54.96% <75.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...src/components/ColumnTypeLabel/ColumnTypeLabel.tsx 100.00% <ø> (ø)
...d/packages/superset-ui-chart-controls/src/index.ts 100.00% <ø> (ø)
...-chart-controls/src/sections/advancedAnalytics.tsx 14.28% <ø> (ø)
...rset-ui-chart-controls/src/sections/chartTitle.tsx 100.00% <ø> (ø)
...legacy-plugin-chart-partition/src/controlPanel.tsx 25.00% <ø> (ø)
...gins/legacy-plugin-chart-rose/src/controlPanel.tsx 50.00% <ø> (ø)
...gins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx 100.00% <ø> (ø)
.../BigNumber/BigNumberWithTrendline/controlPanel.tsx 16.66% <ø> (ø)
...s/plugin-chart-echarts/src/Funnel/controlPanel.tsx 66.66% <ø> (ø)
...ns/plugin-chart-echarts/src/Gauge/controlPanel.tsx 66.66% <ø> (ø)
... and 24 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@zephyring zephyring changed the title chore(view_api): returning application/json content-type for all methods under … chore(view_api): refactor views/api to inherit BaseSupersetApi Jul 20, 2023
@zephyring zephyring changed the title chore(view_api): refactor views/api to inherit BaseSupersetApi chore(view_api): return application/json as content-type for api/v1/form_data endpoint Jul 21, 2023
@@ -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)
Copy link
Member

Choose a reason for hiding this comment

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

nice!

@eschutho eschutho merged commit 0631a80 into apache:master Jul 21, 2023
31 checks passed
@eschutho eschutho deleted the zef/return_application_json_base_api branch July 21, 2023 23:31
@michael-s-molina michael-s-molina added the v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch label Jul 24, 2023
michael-s-molina pushed a commit that referenced this pull request Jul 26, 2023
eschutho pushed a commit that referenced this pull request Oct 19, 2023
@mistercrunch mistercrunch added 🍒 2.1.2 🍒 2.1.3 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.1.0 labels Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.1.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S v2.1 v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch 🍒 2.1.2 🍒 2.1.3 🍒 3.0.0 🍒 3.0.1 🍒 3.0.2 🍒 3.0.3 🍒 3.0.4 🚢 3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants