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: Ignore database extra fields when saving #14465

Conversation

michael-s-molina
Copy link
Member

@michael-s-molina michael-s-molina commented May 4, 2021

SUMMARY

Ignore database extra fields when saving. This is a fix for a regression that prevented the saving of databases or the creation of new ones. The client is sending more data than it should, and this fix ignores this extra data for now. We should definitely fix the client side to send only the necessary information to the API.

@eschutho I know that you are working on this modal. Can you make this modification? After that, you can undo this hotfix.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2021-05-04 at 9 55 53 AM

@rusackas @villebro @dpgaspar @junlincc @eschutho

TEST PLAN

1 - Execute all tests
2 - All tests should pass

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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 May 4, 2021

Codecov Report

Merging #14465 (6f33e69) into master (158ac30) will decrease coverage by 0.03%.
The diff coverage is 63.76%.

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

@@            Coverage Diff             @@
##           master   #14465      +/-   ##
==========================================
- Coverage   77.02%   76.98%   -0.04%     
==========================================
  Files         957      954       -3     
  Lines       48151    48179      +28     
  Branches     6056     6063       +7     
==========================================
+ Hits        37089    37093       +4     
- Misses      10861    10885      +24     
  Partials      201      201              
Flag Coverage Δ
hive ?
mysql 81.06% <100.00%> (+<0.01%) ⬆️
postgres 81.09% <100.00%> (+<0.01%) ⬆️
presto 80.80% <100.00%> (?)
python 81.36% <100.00%> (-0.10%) ⬇️
sqlite 80.70% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...rontend/src/dashboard/containers/DashboardPage.tsx 0.00% <0.00%> (ø)
superset-frontend/src/views/App.tsx 0.00% <0.00%> (ø)
superset/views/base.py 76.19% <ø> (ø)
superset/views/core.py 75.64% <ø> (-0.02%) ⬇️
...rontend/src/views/CRUD/dashboard/DashboardCard.tsx 77.27% <66.66%> (+1.08%) ⬆️
superset-frontend/src/utils/urlUtils.ts 61.53% <75.00%> (+2.44%) ⬆️
superset-frontend/src/views/routes.tsx 64.86% <80.00%> (+1.22%) ⬆️
...set-frontend/src/components/ListViewCard/index.tsx 100.00% <100.00%> (ø)
superset-frontend/src/components/Menu/Menu.tsx 69.47% <100.00%> (+0.99%) ⬆️
...rontend/src/views/CRUD/dashboard/DashboardList.tsx 75.83% <100.00%> (+0.20%) ⬆️
... and 9 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 158ac30...d47b95e. Read the comment docs.

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.

Looks good to me has a quick fix. We should eventually fix the database modal so that it does not send the allows_* extra fields to the backend.

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.

Thanks for investigating and fixing this @michael-s-molina! I agree with Daniel, let's get this in asap but aim to do a more proper follow-up once the dust settles.

@villebro
Copy link
Member

villebro commented May 4, 2021

FYI @eschutho I checked that this was working prior to #14436 and broke after that one, so there appears to have been something in the refactor that introduced this.

@dpgaspar dpgaspar merged commit d138b44 into apache:master May 4, 2021
@eschutho
Copy link
Member

eschutho commented May 4, 2021

Thank you for catching @michael-s-molina. We also reverted the PR and here's the fix: #14470

cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.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 size/XS 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants