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: datasourcedao datasource not found error #20725

Merged
merged 6 commits into from
Jul 19, 2022

Conversation

pkdotson
Copy link
Member

SUMMARY

This pr is a possible fix for potential error of having the wrong type for the datasource type and causing a validation error being thrown.

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

@codecov
Copy link

codecov bot commented Jul 18, 2022

Codecov Report

Merging #20725 (2fa82a4) into master (84d4302) will decrease coverage by 0.19%.
The diff coverage is 100.00%.

❗ Current head 2fa82a4 differs from pull request most recent head e939697. Consider uploading reports for the commit e939697 to get more accurate results

@@            Coverage Diff             @@
##           master   #20725      +/-   ##
==========================================
- Coverage   66.30%   66.11%   -0.20%     
==========================================
  Files        1756     1756              
  Lines       66734    66737       +3     
  Branches     7049     7049              
==========================================
- Hits        44248    44121     -127     
- Misses      20689    20819     +130     
  Partials     1797     1797              
Flag Coverage Δ
hive ?
mysql 81.04% <100.00%> (+<0.01%) ⬆️
postgres 81.11% <100.00%> (+<0.01%) ⬆️
presto ?
python 81.16% <100.00%> (-0.40%) ⬇️
sqlite ?
unit ?

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

Impacted Files Coverage Δ
superset/views/core.py 75.07% <ø> (-0.61%) ⬇️
superset/datasource/dao.py 100.00% <100.00%> (ø)
superset/db_engines/hive.py 0.00% <0.00%> (-85.19%) ⬇️
superset/db_engine_specs/hive.py 70.22% <0.00%> (-15.65%) ⬇️
superset/db_engine_specs/sqlite.py 91.89% <0.00%> (-5.41%) ⬇️
superset/db_engine_specs/presto.py 83.64% <0.00%> (-5.39%) ⬇️
superset/utils/celery.py 86.20% <0.00%> (-3.45%) ⬇️
superset/connectors/sqla/utils.py 86.36% <0.00%> (-2.28%) ⬇️
superset/initialization/__init__.py 89.93% <0.00%> (-1.74%) ⬇️
superset/result_set.py 96.24% <0.00%> (-1.51%) ⬇️
... and 5 more

@pkdotson pkdotson merged commit 1d9d505 into apache:master Jul 19, 2022
@@ -815,7 +815,7 @@ def explore(
try:
datasource = DatasourceDAO.get_datasource(
db.session,
DatasourceType(cast(str, datasource_type)),
DatasourceType("table"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hughhhh @pkdotson I see that this endpoint is deprecated but why are we only using table here?

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.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/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants