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: Users being able to update datasets across DBs #17348

Merged
merged 4 commits into from
Nov 11, 2021

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Nov 5, 2021

SUMMARY

Fixing issue with uniqueness check whenever a user wants to update dataset that has the same schema and table_name. We added additional parameter in the uniqueness check to make sure the we aren't pointing to the same dataset.

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 Nov 5, 2021

Codecov Report

Merging #17348 (ebeb351) into master (33a8e87) will decrease coverage by 0.12%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17348      +/-   ##
==========================================
- Coverage   77.14%   77.01%   -0.13%     
==========================================
  Files        1036     1038       +2     
  Lines       55759    56875    +1116     
  Branches     7628     8001     +373     
==========================================
+ Hits        43013    43804     +791     
- Misses      12490    12792     +302     
- Partials      256      279      +23     
Flag Coverage Δ
hive 81.57% <100.00%> (+0.08%) ⬆️
javascript 71.19% <0.00%> (-0.23%) ⬇️
mysql 81.99% <100.00%> (+0.08%) ⬆️
postgres 82.00% <100.00%> (+0.08%) ⬆️
presto 81.78% <100.00%> (-0.01%) ⬇️
python 82.49% <100.00%> (+0.07%) ⬆️
sqlite 81.67% <100.00%> (+0.08%) ⬆️

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

Impacted Files Coverage Δ
...frontend/src/SqlLab/components/ResultSet/index.tsx 61.48% <0.00%> (ø)
superset/connectors/sqla/models.py 87.97% <ø> (ø)
superset/datasets/dao.py 93.79% <100.00%> (+0.08%) ⬆️
...et-frontend/src/dashboard/actions/sliceEntities.js 9.75% <0.00%> (-3.15%) ⬇️
...tend/src/common/hooks/apiResources/apiResources.ts 93.18% <0.00%> (-1.56%) ⬇️
superset-frontend/src/explore/constants.ts 96.07% <0.00%> (-1.29%) ⬇️
...hboard/components/nativeFilters/FilterBar/state.ts 86.45% <0.00%> (-1.05%) ⬇️
superset/db_engine_specs/presto.py 89.95% <0.00%> (-0.42%) ⬇️
superset-frontend/src/dashboard/actions/hydrate.js 1.56% <0.00%> (-0.15%) ⬇️
superset-frontend/src/constants.ts 100.00% <0.00%> (ø)
... and 23 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 33a8e87...ebeb351. Read the comment docs.

superset/datasets/dao.py Outdated Show resolved Hide resolved
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
@hughhhh hughhhh merged commit a1961cf into master Nov 11, 2021
AAfghahi pushed a commit that referenced this pull request Jan 10, 2022
* add database id back

* add condition to verify dataset is being changed

* Update superset/datasets/dao.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 labels Mar 13, 2024
@mistercrunch mistercrunch deleted the hugh/ds-overwrite-fix branch March 26, 2024 16:12
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 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants