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

refactor: sql lab: handling command exceptions #16852

Merged
merged 3 commits into from
Sep 29, 2021

Conversation

ofekisr
Copy link
Contributor

@ofekisr ofekisr commented Sep 27, 2021

SUMMARY
The sql_json view code in superset core view without any "clean code" standard and it does not adopt any software development principle.

This is the fifteenth PR in the sequence of future PRs ([previous PR](refactor: sql_json view endpoint: move all logic from view to Command class)) try to solve it by refactoring the code.

The PR focus on organizing the command exception handling

actually, there are no logic changes so it implies on the current tests.

@codecov
Copy link

codecov bot commented Sep 29, 2021

Codecov Report

Merging #16852 (a4fe90c) into master (0a8d0c6) will increase coverage by 0.10%.
The diff coverage is 70.49%.

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

@@            Coverage Diff             @@
##           master   #16852      +/-   ##
==========================================
+ Coverage   76.79%   76.90%   +0.10%     
==========================================
  Files        1021     1022       +1     
  Lines       54707    54836     +129     
  Branches     7457     7470      +13     
==========================================
+ Hits        42014    42172     +158     
+ Misses      12449    12418      -31     
- Partials      244      246       +2     
Flag Coverage Δ
mysql 81.85% <85.71%> (+0.04%) ⬆️
postgres 81.91% <85.71%> (+0.04%) ⬆️
presto 81.79% <85.71%> (?)
python 82.17% <85.71%> (+0.18%) ⬆️
sqlite 81.53% <85.71%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...et-frontend/src/dashboard/components/Dashboard.jsx 78.09% <0.00%> (-0.76%) ⬇️
...set-frontend/src/dashboard/containers/Dashboard.ts 0.00% <0.00%> (ø)
superset-frontend/src/dataMask/reducer.ts 68.51% <0.00%> (-2.64%) ⬇️
...ols/FilterControl/AdhocFilterEditPopover/index.jsx 68.33% <ø> (-1.03%) ⬇️
superset-frontend/src/setup/setupColors.ts 100.00% <ø> (ø)
...set-frontend/src/views/CRUD/data/database/types.ts 100.00% <ø> (ø)
superset/databases/api.py 92.95% <ø> (ø)
...c/views/CRUD/data/database/DatabaseModal/index.tsx 44.05% <4.34%> (-0.09%) ⬇️
.../database/DatabaseModal/DatabaseConnectionForm.tsx 48.71% <5.88%> (-5.21%) ⬇️
...ols/DndColumnSelectControl/ColumnSelectPopover.tsx 16.12% <14.28%> (+0.97%) ⬆️
... and 34 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 0a8d0c6...2d4bddb. Read the comment docs.

Copy link
Member

@amitmiran137 amitmiran137 left a comment

Choose a reason for hiding this comment

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

LGTM!

@amitmiran137 amitmiran137 merged commit 3f784cc into apache:master Sep 29, 2021
@amitmiran137 amitmiran137 deleted the refactor/sql_lab2 branch September 29, 2021 13:21
@etr2460 etr2460 mentioned this pull request Oct 7, 2021
9 tasks
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
* chore: support error_type in SupersetException and method to convert the exception to dictionary

* chore: support error_type in SupersetException and method to convert the exception to dictionary

* refactor handling command exceptions   fix update query status when query was not created
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
* chore: support error_type in SupersetException and method to convert the exception to dictionary

* chore: support error_type in SupersetException and method to convert the exception to dictionary

* refactor handling command exceptions   fix update query status when query was not created
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.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/L 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants