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: DB parameter validation API #14636

Merged
merged 1 commit into from
May 14, 2021

Conversation

betodealmeida
Copy link
Member

SUMMARY

I was testing the new validation API for DB parameters and realized that it would fail in certain cases because the SIP-41 handler uses dataclasses.asdict, which doesn't play nice with defaultdict (https://bugs.python.org/issue35540).

I added custom code to handle the payload with defaultdict in case there's a validation error, converting to a normal dict.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TEST PLAN

Added a unit test covering the regression.

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 14, 2021

Codecov Report

Merging #14636 (d7c8a3a) into master (e4d2424) will decrease coverage by 0.00%.
The diff coverage is 75.00%.

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

@@            Coverage Diff             @@
##           master   #14636      +/-   ##
==========================================
- Coverage   77.47%   77.47%   -0.01%     
==========================================
  Files         958      958              
  Lines       48486    48490       +4     
  Branches     5679     5679              
==========================================
+ Hits        37565    37568       +3     
- Misses      10721    10722       +1     
  Partials      200      200              
Flag Coverage Δ
hive 80.96% <75.00%> (-0.01%) ⬇️
mysql 81.24% <75.00%> (-0.01%) ⬇️
postgres 81.26% <75.00%> (-0.01%) ⬇️
presto 80.96% <75.00%> (-0.01%) ⬇️
python 81.79% <75.00%> (-0.01%) ⬇️
sqlite 80.88% <75.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
superset/databases/schemas.py 99.54% <ø> (ø)
superset/databases/api.py 92.17% <75.00%> (-0.25%) ⬇️

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 e4d2424...c9a7932. Read the comment docs.

@betodealmeida betodealmeida added the need:merge The PR is ready to be merged label May 14, 2021
@betodealmeida betodealmeida merged commit ba5d66c into apache:master May 14, 2021
@junlincc junlincc removed the need:merge The PR is ready to be merged label May 14, 2021
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/S 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants