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

chore: return 404 instead of 500 for datasource not found #22333

Merged
merged 2 commits into from
Dec 6, 2022

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Dec 5, 2022

SUMMARY

Errors bubbling up from DAO where the underlying datasource has been deleted, but then users who try to view a chart or dashboard are getting 500s instead of 404s. User's will see the following when they goto where the datasource is not found.

Screen Shot 2022-12-05 at 6 26 55 PM

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 Dec 5, 2022

Codecov Report

Merging #22333 (efa701f) into master (2d30e9c) will decrease coverage by 1.47%.
The diff coverage is 40.00%.

@@            Coverage Diff             @@
##           master   #22333      +/-   ##
==========================================
- Coverage   66.86%   65.39%   -1.48%     
==========================================
  Files        1846     1847       +1     
  Lines       70510    70532      +22     
  Branches     7723     7729       +6     
==========================================
- Hits        47144    46121    -1023     
- Misses      21364    22408    +1044     
- Partials     2002     2003       +1     
Flag Coverage Δ
hive ?
javascript 53.80% <ø> (+<0.01%) ⬆️
mysql 77.95% <40.00%> (-0.01%) ⬇️
postgres 78.02% <40.00%> (-0.01%) ⬇️
presto ?
python 78.14% <40.00%> (-3.10%) ⬇️
sqlite 76.48% <40.00%> (-0.01%) ⬇️
unit ?

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

Impacted Files Coverage Δ
superset/charts/data/api.py 88.34% <40.00%> (-1.53%) ⬇️
superset/db_engines/hive.py 0.00% <0.00%> (-85.19%) ⬇️
...set/advanced_data_type/plugins/internet_address.py 16.32% <0.00%> (-79.60%) ⬇️
superset/utils/pandas_postprocessing/boxplot.py 20.51% <0.00%> (-79.49%) ⬇️
superset/charts/post_processing.py 11.76% <0.00%> (-77.95%) ⬇️
...perset/advanced_data_type/plugins/internet_port.py 18.75% <0.00%> (-77.09%) ⬇️
superset/utils/pandas_postprocessing/rolling.py 21.87% <0.00%> (-68.75%) ⬇️
...perset/utils/pandas_postprocessing/contribution.py 34.61% <0.00%> (-65.39%) ⬇️
superset/utils/pandas_postprocessing/resample.py 37.50% <0.00%> (-62.50%) ⬇️
superset/utils/pandas_postprocessing/select.py 38.46% <0.00%> (-61.54%) ⬇️
... and 64 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@hughhhh hughhhh merged commit 2f23a9c into master Dec 6, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
@mistercrunch mistercrunch deleted the datasource-not-found branch March 26, 2024 16:09
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 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants