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(Dashboard): Save empty label_colors in json_metadata #17462

Merged
merged 2 commits into from
Nov 18, 2021
Merged

fix(Dashboard): Save empty label_colors in json_metadata #17462

merged 2 commits into from
Nov 18, 2021

Conversation

geido
Copy link
Member

@geido geido commented Nov 17, 2021

SUMMARY

It was impossible to delete the entire label_colors object in json_metadata as the backend would not update it. This PR fixes that

TESTING INSTRUCTIONS

  1. Open a Dashboard with custom label_colors in json_metadata (Edit properties)
  2. Delete the entire label_colors object
  3. Refresh the Dashboard
  4. Make sure the label_colors are deleted

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 Nov 17, 2021

Codecov Report

Merging #17462 (645ab4f) into master (c54027a) will decrease coverage by 0.22%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17462      +/-   ##
==========================================
- Coverage   76.94%   76.72%   -0.23%     
==========================================
  Files        1042     1042              
  Lines       56299    56311      +12     
  Branches     7793     7793              
==========================================
- Hits        43322    43207     -115     
- Misses      12721    12848     +127     
  Partials      256      256              
Flag Coverage Δ
hive ?
mysql 81.94% <100.00%> (-0.02%) ⬇️
postgres 81.95% <100.00%> (-0.02%) ⬇️
presto ?
python 82.03% <100.00%> (-0.43%) ⬇️
sqlite 81.62% <100.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
superset/dashboards/dao.py 96.09% <100.00%> (-0.04%) ⬇️
superset/db_engines/hive.py 0.00% <0.00%> (-85.19%) ⬇️
superset/db_engine_specs/hive.py 69.49% <0.00%> (-16.99%) ⬇️
superset/db_engine_specs/presto.py 83.47% <0.00%> (-6.91%) ⬇️
superset/tasks/async_queries.py 91.02% <0.00%> (-5.95%) ⬇️
superset/views/database/mixins.py 81.03% <0.00%> (-1.73%) ⬇️
superset/connectors/sqla/models.py 86.79% <0.00%> (-1.59%) ⬇️
superset/models/core.py 89.26% <0.00%> (-0.74%) ⬇️
superset/charts/data/api.py 87.91% <0.00%> (-0.66%) ⬇️
superset/db_engine_specs/base.py 88.20% <0.00%> (-0.39%) ⬇️
... and 2 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 c54027a...645ab4f. Read the comment docs.

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM

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 - just curious, could the same problem happen with color_namespace?

@geido
Copy link
Member Author

geido commented Nov 18, 2021

LGTM - just curious, could the same problem happen with color_namespace?

Yes it might be. I have a PR upcoming related to the color scheme. I'll test it and fix it there. Thanks!

@geido geido merged commit b2363e4 into apache:master Nov 18, 2021
AAfghahi pushed a commit that referenced this pull request Jan 10, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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 size/XS 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants