Skip to content

fix: import should accept old keys#17330

Merged
betodealmeida merged 3 commits intoapache:masterfrom
betodealmeida:ch27296
Nov 3, 2021
Merged

fix: import should accept old keys#17330
betodealmeida merged 3 commits intoapache:masterfrom
betodealmeida:ch27296

Conversation

@betodealmeida
Copy link
Copy Markdown
Member

@betodealmeida betodealmeida commented Nov 3, 2021

SUMMARY

#16756 renamed a few fields on a versioned schema, breaking import/export, since old exports are no longer valid.

I reverted the schema to the original V1, and fixed export to produce the original schema. I also fixed the import to support the new keys, since exports might've been made with the incorrect schema.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

Added unit tests.

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
Copy Markdown

codecov Bot commented Nov 3, 2021

Codecov Report

Merging #17330 (c06a8e5) into master (7c6d6f4) will decrease coverage by 0.18%.
The diff coverage is 76.14%.

❗ Current head c06a8e5 differs from pull request most recent head 843ea31. Consider uploading reports for the commit 843ea31 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17330      +/-   ##
==========================================
- Coverage   77.15%   76.97%   -0.19%     
==========================================
  Files        1037     1036       -1     
  Lines       55639    55686      +47     
  Branches     7612     7627      +15     
==========================================
- Hits        42930    42862      -68     
- Misses      12459    12568     +109     
- Partials      250      256       +6     
Flag Coverage Δ
hive ?
mysql 82.01% <94.11%> (+0.03%) ⬆️
postgres 82.02% <94.11%> (+0.03%) ⬆️
presto ?
python 82.10% <94.11%> (-0.36%) ⬇️
sqlite 81.69% <94.11%> (?)

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

Impacted Files Coverage Δ
superset-frontend/src/chart/Chart.jsx 43.33% <ø> (ø)
superset-frontend/src/chart/ChartRenderer.jsx 36.70% <0.00%> (-0.48%) ⬇️
superset-frontend/src/dashboard/actions/hydrate.js 1.70% <0.00%> (ø)
.../src/dashboard/components/gridComponents/Chart.jsx 80.37% <ø> (ø)
...perset-frontend/src/explore/components/Control.tsx 72.22% <0.00%> (-4.25%) ⬇️
...ntend/src/explore/components/ExploreChartPanel.jsx 14.28% <ø> (ø)
...nd/src/explore/components/ExploreViewContainer.jsx 2.11% <ø> (ø)
...-frontend/src/explore/components/controls/index.js 100.00% <ø> (ø)
...et-frontend/src/explore/controlPanels/sections.tsx 100.00% <ø> (ø)
superset-frontend/src/explore/controls.jsx 30.13% <ø> (+0.40%) ⬆️
... and 39 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 7c6d6f4...843ea31. Read the comment docs.

@pull-request-size pull-request-size Bot added size/L and removed size/M labels Nov 3, 2021
@betodealmeida betodealmeida merged commit cb34a22 into apache:master Nov 3, 2021
@eschutho eschutho added the v1.4 label Nov 22, 2021
eschutho pushed a commit that referenced this pull request Nov 22, 2021
* fix: import should accept old keys

* Fix lint

* Preserve V1 schema
@eschutho eschutho removed the v1.4 label Dec 15, 2021
eschutho added a commit to preset-io/superset that referenced this pull request Dec 15, 2021
AAfghahi pushed a commit that referenced this pull request Jan 10, 2022
* fix: import should accept old keys

* Fix lint

* Preserve V1 schema
@mistercrunch mistercrunch added 🍒 1.4.0 Cherry-picked to 1.4.0 🍒 1.4.1 Cherry-picked to 1.4.1 🍒 1.4.2 Cherry-picked to 1.4.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 First shipped in 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/L 🍒 1.4.0 Cherry-picked to 1.4.0 🍒 1.4.1 Cherry-picked to 1.4.1 🍒 1.4.2 Cherry-picked to 1.4.2 🚢 1.5.0 First shipped in 1.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants