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

feat(datasets): REST API bulk delete #11237

Merged
merged 2 commits into from
Oct 12, 2020

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Oct 12, 2020

SUMMARY

New REST API endpoint for bulk deleting datasets

Screenshot 2020-10-12 at 13 11 06

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov-io
Copy link

codecov-io commented Oct 12, 2020

Codecov Report

Merging #11237 into master will increase coverage by 0.04%.
The diff coverage is 85.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11237      +/-   ##
==========================================
+ Coverage   65.51%   65.56%   +0.04%     
==========================================
  Files         831      832       +1     
  Lines       39303    39388      +85     
  Branches     3592     3592              
==========================================
+ Hits        25751    25823      +72     
- Misses      13443    13456      +13     
  Partials      109      109              
Flag Coverage Δ
#cypress 55.88% <ø> (-0.01%) ⬇️
#javascript 62.40% <ø> (ø)
#python 60.78% <85.88%> (+0.08%) ⬆️

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

Impacted Files Coverage Δ
superset/datasets/dao.py 86.48% <76.47%> (-1.82%) ⬇️
superset/datasets/commands/bulk_delete.py 87.23% <87.23%> (ø)
superset/datasets/api.py 91.87% <88.88%> (-0.38%) ⬇️
superset/datasets/commands/exceptions.py 92.45% <100.00%> (+0.29%) ⬆️
superset/datasets/schemas.py 94.36% <100.00%> (+0.08%) ⬆️
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 81.74% <0.00%> (-0.80%) ⬇️

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 e647286...d920fbf. Read the comment docs.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM. Just one question that probably isn't relevant (just me thinking out lout).

Comment on lines +544 to +548
message=ngettext(
"Deleted %(num)d dataset",
"Deleted %(num)d datasets",
num=len(item_ids),
),
Copy link
Member

Choose a reason for hiding this comment

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

Nice, I'll have to start using this, too 👍

self._models: Optional[List[SqlaTable]] = None

def run(self) -> None:
self.validate()
Copy link
Member

Choose a reason for hiding this comment

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

Curious, is this something that could be done in a decorator?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, there's some repetition of this one

@dpgaspar dpgaspar merged commit 9e9dac6 into apache:master Oct 12, 2020
@dpgaspar dpgaspar deleted the feat/dataset-bulk branch October 12, 2020 12:40
dpgaspar added a commit to preset-io/superset that referenced this pull request Oct 12, 2020
* feat(datasets): REST API bulk delete

* doc HTTP 400
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
* feat(datasets): REST API bulk delete

* doc HTTP 400
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* feat(datasets): REST API bulk delete

* doc HTTP 400
@mistercrunch mistercrunch added 🍒 0.38.0 🍒 0.38.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 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 🍒 0.38.0 🍒 0.38.1 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants