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

feat: Area viz migration #20359

Merged
merged 4 commits into from
Jul 8, 2022
Merged

Conversation

zhaoyongjie
Copy link
Member

@zhaoyongjie zhaoyongjie commented Jun 13, 2022

SUMMARY

  1. Migrate Area Chart to v2
  2. fix migration double heads

image

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

# upgrade
superset db upgrade

# downgrade
superset db downgrade

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

@pull-request-size pull-request-size bot added size/L and removed size/XL labels Jul 7, 2022
@zhaoyongjie zhaoyongjie mentioned this pull request Jul 7, 2022
9 tasks
@zhaoyongjie zhaoyongjie marked this pull request as ready for review July 7, 2022 12:13
@zhaoyongjie zhaoyongjie requested a review from a team as a code owner July 7, 2022 12:13
@codecov
Copy link

codecov bot commented Jul 7, 2022

Codecov Report

Merging #20359 (45680cc) into master (e331640) will increase coverage by 0.07%.
The diff coverage is 100.00%.

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

@@            Coverage Diff             @@
##           master   #20359      +/-   ##
==========================================
+ Coverage   66.78%   66.85%   +0.07%     
==========================================
  Files        1754     1754              
  Lines       65857    65748     -109     
  Branches     7030     6950      -80     
==========================================
- Hits        43982    43957      -25     
+ Misses      20086    20028      -58     
+ Partials     1789     1763      -26     
Flag Coverage Δ
hive 53.78% <42.10%> (-0.11%) ⬇️
mysql 82.42% <100.00%> (+0.06%) ⬆️
postgres 82.49% <100.00%> (+0.06%) ⬆️
presto 53.64% <42.10%> (-0.11%) ⬇️
python 82.93% <100.00%> (+0.05%) ⬆️
sqlite 82.28% <100.00%> (+0.06%) ⬆️
unit 50.80% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
superset/utils/migrate_viz.py 95.18% <100.00%> (+1.24%) ⬆️
...et-frontend/src/dashboard/actions/sliceEntities.js 53.84% <0.00%> (-20.44%) ⬇️
superset/views/dashboard/views.py 65.51% <0.00%> (-0.77%) ⬇️
superset/datasets/dao.py 93.57% <0.00%> (-0.55%) ⬇️
superset/utils/csv.py 97.91% <0.00%> (-0.36%) ⬇️
superset/views/chart/views.py 89.74% <0.00%> (-0.26%) ⬇️
superset/models/dashboard.py 76.06% <0.00%> (-0.23%) ⬇️
superset/commands/utils.py 97.14% <0.00%> (-0.16%) ⬇️
superset/reports/dao.py 83.20% <0.00%> (-0.14%) ⬇️
superset/views/core.py 77.36% <0.00%> (ø)
... and 81 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 e331640...b6102c5. Read the comment docs.

superset/utils/migrate_viz.py Outdated Show resolved Hide resolved
slc.slice_name, str(exc)
)
)
session.commit()
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't this commit only after all the values have been merged as opposed to committing every thousand values?

Copy link
Member Author

Choose a reason for hiding this comment

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

same as the TreeMap migration, optimize write speed.
The yield_per just optimizes the memory used rate when retrieving large data, the commit() only run one time after the update.

@john-bodley
Copy link
Member

@zhaoyongjie would you mind explaining the purpose of this migration if the "Area Chart" chart type still exists? Is the intention to fully deprecate said chart type? If so this migration would need to be re-run.

@zhaoyongjie
Copy link
Member Author

@john-bodley Sorry, I'm stuck in another PR with a cypress problem. I think the migration process should be re-run after resolve the frontend migration issue.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.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/L 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants