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 iframe to markdown db migration #11845

Merged
merged 2 commits into from
Dec 1, 2020

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Nov 30, 2020

SUMMARY

Fixing a reported issue on a db migration with the following error:

INFO  [alembic.runtime.migration] Running upgrade f2672aa8350a -> 978245563a02, Migrate iframe in dashboard to markdown component
scanning dashboard (1/2) dashboard: 19 >>>>
ERROR [root] dashboard 19 has error: dictionary keys changed during iteration
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/superset/migrations/versions/978245563a02_migrate_iframe_to_dash_markdown.py", line 135, in upgrade
    for key, chart_position in position_dict.items():
RuntimeError: dictionary keys changed during iteration

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov-io
Copy link

codecov-io commented Nov 30, 2020

Codecov Report

Merging #11845 (8bcd59e) into master (4666445) will decrease coverage by 6.62%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11845      +/-   ##
==========================================
- Coverage   67.12%   60.50%   -6.63%     
==========================================
  Files         915      872      -43     
  Lines       44537    42925    -1612     
  Branches     4235     3749     -486     
==========================================
- Hits        29897    25972    -3925     
- Misses      14526    16953    +2427     
+ Partials      114        0     -114     
Flag Coverage Δ
cypress 55.08% <ø> (+3.47%) ⬆️
javascript ?
python 63.29% <0.00%> (-0.81%) ⬇️

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

Impacted Files Coverage Δ
...ns/978245563a02_migrate_iframe_to_dash_markdown.py 0.00% <0.00%> (ø)
...uperset-frontend/src/dashboard/util/dnd-reorder.js 0.00% <0.00%> (-100.00%) ⬇️
...rset-frontend/src/dashboard/util/getEmptyLayout.js 0.00% <0.00%> (-100.00%) ⬇️
...dashboard/components/resizable/ResizableHandle.jsx 0.00% <0.00%> (-100.00%) ⬇️
.../src/dashboard/util/getFilterScopeFromNodesTree.js 0.00% <0.00%> (-93.48%) ⬇️
...src/dashboard/components/gridComponents/Header.jsx 10.52% <0.00%> (-86.85%) ⬇️
...rc/dashboard/components/gridComponents/Divider.jsx 13.33% <0.00%> (-86.67%) ⬇️
superset/db_engines/hive.py 0.00% <0.00%> (-85.72%) ⬇️
...ontend/src/dashboard/util/getDashboardFilterKey.ts 14.28% <0.00%> (-85.72%) ⬇️
...nd/src/views/CRUD/data/query/QueryPreviewModal.tsx 14.70% <0.00%> (-82.97%) ⬇️
... and 338 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 4666445...8bcd59e. Read the comment docs.

@dpgaspar dpgaspar requested a review from villebro November 30, 2020 13:05
@dpgaspar dpgaspar marked this pull request as ready for review November 30, 2020 13:05
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 fixing! Minimal non-blocking nit.

…sh_markdown.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
Copy link

@graceguo-supercat graceguo-supercat 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 fixing it.

@graceguo-supercat
Copy link

Just curious...why I didn't hit this error while testing it (python 3.7)?

@villebro
Copy link
Member

villebro commented Dec 1, 2020

@graceguo-supercat AFAIK python 3.8 is more strict about this than previous versions.

@dpgaspar dpgaspar added the risk:db-migration PRs that require a DB migration label Dec 1, 2020
@dpgaspar dpgaspar merged commit ac9761c into apache:master Dec 1, 2020
@dpgaspar dpgaspar deleted the fix/mig_iframe branch December 1, 2020 20:50
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 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 risk:db-migration PRs that require a DB migration size/S 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants