Skip to content

fix: Use superset generic db to catch external_metadata queries - #13974

Merged
hughhhh merged 6 commits into
masterfrom
hxgh/databaseerror-databaseerror-redacted-message
Apr 10, 2021
Merged

hughhhh merged 6 commits into
masterfrom
hxgh/databaseerror-databaseerror-redacted-message

Conversation

@hughhhh

@hughhhh hughhhh commented Apr 6, 2021 •

Copy link
Copy Markdown
Member

SUMMARY

Stopping 500 errors from raising on external metadata queries. So wrapped cursor = conn.cursor() inside try/catch with a SupersetGenericDBError to return 400 instead.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

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

codecov Bot commented Apr 6, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #13974 (c68c779) into master (bfa6140) will decrease coverage by 0.11%.
The diff coverage is 57.14%.

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

@@            Coverage Diff             @@
##           master   #13974      +/-   ##
==========================================
- Coverage   79.50%   79.39%   -0.12%     
==========================================
  Files         938      940       +2     
  Lines       47517    47593      +76     
  Branches     5939     5962      +23     
==========================================
+ Hits        37778    37786       +8     
- Misses       9618     9685      +67     
- Partials      121      122       +1     
Flag Coverage Δ
cypress 56.05% <35.71%> (-0.01%) ⬇️
hive 80.46% <81.81%> (-0.01%) ⬇️
mysql 80.73% <81.81%> (-0.01%) ⬇️
postgres 80.77% <81.81%> (?)
presto ?
python 81.15% <81.81%> (-0.16%) ⬇️
sqlite ?

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

Impacted Files Coverage Δ
...rset-frontend/src/SqlLab/components/QueryTable.jsx 66.66% <ø> (ø)
...et-frontend/src/SqlLab/components/TableElement.jsx 89.02% <ø> (ø)
.../nativeFilters/FilterBar/FilterSets/utils/index.ts 16.66% <0.00%> (ø)
...erset-frontend/src/datasource/DatasourceEditor.jsx 65.96% <ø> (ø)
superset-frontend/src/common/components/Card.tsx 20.00% <20.00%> (ø)
.../src/explore/components/ControlPanelsContainer.tsx 94.63% <50.00%> (-2.72%) ⬇️
superset/connectors/sqla/models.py 88.24% <81.81%> (-1.91%) ⬇️
superset-frontend/src/common/components/index.tsx 100.00% <100.00%> (ø)
...set-frontend/src/components/ListViewCard/index.tsx 100.00% <100.00%> (ø)
... and 15 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 bfa6140...300769d. Read the comment docs.

@hughhhh hughhhh changed the title fix: Use superset generic db to catch fix: Use superset generic db to catch external_metadata queries Apr 6, 2021
@pull-request-size pull-request-size Bot added size/M and removed size/S labels Apr 7, 2021
@hughhhh
hughhhh requested review from betodealmeida and nytai April 8, 2021 14:37
@hughhhh
hughhhh marked this pull request as ready for review April 8, 2021 15:43
@hughhhh
hughhhh force-pushed the hxgh/databaseerror-databaseerror-redacted-message branch from e0e92ed to e577365 Compare April 9, 2021 20:43
@hughhhh
hughhhh force-pushed the hxgh/databaseerror-databaseerror-redacted-message branch from b089d6a to 300769d Compare April 9, 2021 22:14
@hughhhh
hughhhh merged commit a4fd6b8 into master Apr 10, 2021
amitmiran137 pushed a commit that referenced this pull request Apr 13, 2021
* master: (53 commits)
  test: Adds tests to the UndoRedoKeyListeners component (#13919)
  chore: Adds dataMask reducer to reducerIndex (#13951)
  test: Tests audit for the Dashboard FilterBar (#13916)
  fix: unable to apply logging format (#14074)
  refactor: Bootstrap to AntD - Slider (#13989)
  chore(spa refactor): refactoring dashboard to use api's instead of bootstrapdata (#13306)
  fix(listview): update listview feature flag (#13906)
  Add docs for configuring Docker Compose setup (#13961)
  feat: invalid password error message (Postgres) (#14038)
  fix: flacky test in test_update_dataset_item_w_override_columns (#14082)
  feat: Implement Celery SoftTimeLimit handling (#13740)
  feat: only send alert error emails to owners of the alert (#13862)
  feat: add descriptions to report emails (#13827)
  Make chart exclude itself from cross filtering (#14046)
  fix: fix bug when remove chart not  removing it's related cross filter data (#14081)
  feat(native-filters): Add default first value to select filter (#13726)
  feat: Make async query JWT cookie domain configurable (#14007)
  fix: add exception to catch session not having JWT (#14036)
  Use consistent chart value (#14031)
  fix: Use superset generic db to catch external_metadata queries (#13974)
  ...
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
@rusackas
rusackas deleted the hxgh/databaseerror-databaseerror-redacted-message branch January 30, 2023 19:20
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 First shipped in 1.2.0 labels Mar 12, 2024
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
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/M 🚢 1.2.0 First shipped in 1.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants