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(databases): UnboundLocalError in Exception Handler for load_engine_specs #19422

Closed
wants to merge 1 commit into from

Conversation

cancan101
Copy link
Contributor

Currently you get this error if the Exception handler is hit:

UnboundLocalError: local variable 'engine_spec' referenced before assignment

SUMMARY

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

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

Currently you get this error if the Exception handler is hit:
```
UnboundLocalError: local variable 'engine_spec' referenced before assignmen
```
@codecov
Copy link

codecov bot commented Mar 30, 2022

Codecov Report

Merging #19422 (112891d) into master (0968f86) will decrease coverage by 0.16%.
The diff coverage is 0.00%.

❗ Current head 112891d differs from pull request most recent head 1e80d73. Consider uploading reports for the commit 1e80d73 to get more accurate results

@@            Coverage Diff             @@
##           master   #19422      +/-   ##
==========================================
- Coverage   66.55%   66.39%   -0.17%     
==========================================
  Files        1670     1670              
  Lines       63824    63824              
  Branches     6510     6510              
==========================================
- Hits        42481    42374     -107     
- Misses      19654    19761     +107     
  Partials     1689     1689              
Flag Coverage Δ
hive ?
mysql 81.86% <0.00%> (ø)
postgres 81.91% <0.00%> (ø)
presto ?
python 82.00% <0.00%> (-0.35%) ⬇️
sqlite 81.67% <0.00%> (ø)

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

Impacted Files Coverage Δ
superset/db_engine_specs/__init__.py 88.46% <0.00%> (ø)
superset/db_engines/hive.py 0.00% <0.00%> (-85.19%) ⬇️
superset/db_engine_specs/hive.py 70.00% <0.00%> (-15.77%) ⬇️
superset/db_engine_specs/presto.py 83.68% <0.00%> (-5.44%) ⬇️
superset/connectors/sqla/models.py 88.43% <0.00%> (-1.22%) ⬇️
superset/db_engine_specs/base.py 87.97% <0.00%> (-0.34%) ⬇️
superset/models/core.py 88.80% <0.00%> (-0.24%) ⬇️
superset/utils/core.py 89.71% <0.00%> (-0.12%) ⬇️

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 0968f86...1e80d73. Read the comment docs.

@cancan101 cancan101 changed the title Fixes UnboundLocalError in Exception Handler for load_engine_specs fixe(databases): UnboundLocalError in Exception Handler for load_engine_specs Mar 30, 2022
@cancan101 cancan101 changed the title fixe(databases): UnboundLocalError in Exception Handler for load_engine_specs fix(databases): UnboundLocalError in Exception Handler for load_engine_specs Mar 30, 2022
@rusackas
Copy link
Member

Wow, I'm really sorry this didn't get more attention earlier and get merged. We're thankful for your contribution nonetheless. If you ever submit more fixes that don't get attention in the future, please nag us here and on Slack. The squeaky wheel gets the grease!

In any case, it seems there was another PR that was merged, which fixes the same issue:
#20714

I'll close this one since that got in. Thanks again!

@rusackas rusackas closed this Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants