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: chart id mapping in dashboard api #22179

Merged
merged 2 commits into from
Nov 21, 2022

Conversation

villebro
Copy link
Member

SUMMARY

The result payload of the /api/v1/dashboard/<pk>/charts endpoint is currently missing the chart's id due to the field being mapped incorrectly to slice_id (it's id in the model). This fixes the error and adds a description to the id field.

AFTER

Now the playload contains the id of the chart in accordance with the OpenAPI spec:
image

BEFORE

Previously the id was missing due to incorrectly being referenced as slice_id:
image

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

@dpgaspar dpgaspar changed the title fix: chart id mapping in dasbhoard api fix: chart id mapping in dashboard api Nov 21, 2022
Copy link
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

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

Nice, add a test to make sure all expected fields are returned

@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Merging #22179 (da0a669) into master (2e5270c) will decrease coverage by 1.46%.
The diff coverage is 100.00%.

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

@@            Coverage Diff             @@
##           master   #22179      +/-   ##
==========================================
- Coverage   67.00%   65.53%   -1.47%     
==========================================
  Files        1835     1835              
  Lines       69970    69971       +1     
  Branches     7590     7590              
==========================================
- Hits        46880    45857    -1023     
- Misses      21124    22148    +1024     
  Partials     1966     1966              
Flag Coverage Δ
hive ?
mysql 78.14% <100.00%> (+<0.01%) ⬆️
postgres 78.21% <100.00%> (+<0.01%) ⬆️
presto ?
python 78.33% <100.00%> (-3.06%) ⬇️
sqlite 76.66% <100.00%> (+<0.01%) ⬆️
unit ?

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

Impacted Files Coverage Δ
superset/charts/schemas.py 99.35% <100.00%> (+<0.01%) ⬆️
superset/db_engines/hive.py 0.00% <0.00%> (-85.19%) ⬇️
...set/advanced_data_type/plugins/internet_address.py 16.32% <0.00%> (-79.60%) ⬇️
superset/utils/pandas_postprocessing/boxplot.py 20.51% <0.00%> (-79.49%) ⬇️
superset/charts/post_processing.py 11.76% <0.00%> (-77.95%) ⬇️
...perset/advanced_data_type/plugins/internet_port.py 18.75% <0.00%> (-77.09%) ⬇️
superset/utils/pandas_postprocessing/rolling.py 21.87% <0.00%> (-68.75%) ⬇️
...perset/utils/pandas_postprocessing/contribution.py 34.61% <0.00%> (-65.39%) ⬇️
superset/utils/pandas_postprocessing/resample.py 37.50% <0.00%> (-62.50%) ⬇️
superset/utils/pandas_postprocessing/select.py 38.46% <0.00%> (-61.54%) ⬇️
... and 57 more

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

@villebro villebro merged commit ac0ff78 into apache:master Nov 21, 2022
@villebro villebro deleted the villebro/dashboard-related-chart-id branch November 21, 2022 16:32
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 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 size/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants