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

fix: advanced data type API spec and permission name #20128

Merged
merged 5 commits into from
May 20, 2022

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented May 19, 2022

SUMMARY

Simple fix for the new advanced type REST API, we currently use can_read permissions instead of FAB default can_get
also simplified the OpenAPI spec and added the rison schema to the decorator so that JSON schema will actually be evaluated

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

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this improvement! FYI @cccs-RyanS

@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

Merging #20128 (7513874) into master (660af40) will decrease coverage by 0.18%.
The diff coverage is 77.77%.

❗ Current head 7513874 differs from pull request most recent head 5112dbd. Consider uploading reports for the commit 5112dbd to get more accurate results

@@            Coverage Diff             @@
##           master   #20128      +/-   ##
==========================================
- Coverage   66.47%   66.28%   -0.19%     
==========================================
  Files        1721     1721              
  Lines       64477    64481       +4     
  Branches     6795     6795              
==========================================
- Hits        42858    42743     -115     
- Misses      19891    20010     +119     
  Partials     1728     1728              
Flag Coverage Δ
hive ?
mysql 82.14% <100.00%> (+<0.01%) ⬆️
postgres 82.20% <100.00%> (+<0.01%) ⬆️
presto ?
python 82.24% <100.00%> (-0.38%) ⬇️
sqlite ?
unit ?

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

Impacted Files Coverage Δ
...d/packages/superset-ui-chart-controls/src/types.ts 100.00% <ø> (ø)
...egacy-plugin-chart-event-flow/src/controlPanel.tsx 14.28% <0.00%> (ø)
...chart-echarts/src/MixedTimeseries/controlPanel.tsx 92.85% <ø> (ø)
.../plugin-chart-echarts/src/MixedTimeseries/index.ts 50.00% <ø> (ø)
...hart-echarts/src/MixedTimeseries/transformProps.ts 0.00% <0.00%> (ø)
...gin-chart-echarts/src/Timeseries/transformProps.ts 56.86% <ø> (ø)
...tend/plugins/plugin-chart-echarts/src/constants.ts 100.00% <ø> (ø)
...d/plugins/plugin-chart-echarts/src/utils/series.ts 92.00% <ø> (ø)
...tend/plugins/plugin-chart-echarts/src/controls.tsx 73.91% <66.66%> (ø)
...t-frontend/src/dashboard/components/SliceAdder.jsx 69.35% <90.90%> (ø)
... and 31 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 660af40...5112dbd. Read the comment docs.

@pull-request-size pull-request-size bot added size/M and removed size/S labels May 19, 2022
@@ -96,15 +90,9 @@ def get(self, **kwargs: Any) -> Response:
500:
$ref: '#/components/responses/500'
"""
items = kwargs["rison"]
advanced_data_type = items.get("type")
if not advanced_data_type:
Copy link
Member Author

Choose a reason for hiding this comment

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

Rison automatically parses the query string from the defined json schema

Copy link
Member

Choose a reason for hiding this comment

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

Good catch 👍

@dpgaspar dpgaspar merged commit d8117f7 into apache:master May 20, 2022
@dpgaspar dpgaspar deleted the fix/advanced-api-permission branch May 20, 2022 09:08
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
* fix: advanced data type API spec and permission name

* fix openAPI spec

* fix query schema

* fix query schema

* fix query schema
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels preset-io size/M 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants