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: Assign an owner when creating a dataset from a csv, excel or tabular #17986

Conversation

cccs-joel
Copy link
Contributor

SUMMARY

The existing code has a bug and no owner gets assigned when a dataset was created from a data upload. The fix assigns the current user as the owner when creating a dataset from a csv, excel or tabular.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

  1. Ensure you have a defined database that allows data upload
  2. From the Data drop-down menu in the top menu bar, select Upload a CSV
  3. Enter appropriate values and hit SAVE.
  4. Find the dataset created in /tablemodelview/list/ and click the Edit icon.
  5. In the Settings tab of the dialog, under Owners, the user who uploaded the data is listed.

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 Jan 10, 2022

Codecov Report

Merging #17986 (3941192) into master (05d9cde) will decrease coverage by 0.26%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17986      +/-   ##
==========================================
- Coverage   67.10%   66.83%   -0.27%     
==========================================
  Files        1612     1631      +19     
  Lines       64999    65739     +740     
  Branches     6872     6872              
==========================================
+ Hits        43616    43937     +321     
- Misses      19513    19932     +419     
  Partials     1870     1870              
Flag Coverage Δ
hive 52.17% <0.00%> (-1.15%) ⬇️
mysql 81.28% <100.00%> (-0.95%) ⬇️
postgres 81.32% <100.00%> (-0.95%) ⬇️
presto 52.01% <0.00%> (-1.15%) ⬇️
python 81.76% <100.00%> (-0.95%) ⬇️
sqlite 81.02% <100.00%> (-0.94%) ⬇️

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

Impacted Files Coverage Δ
superset/views/database/views.py 88.46% <100.00%> (ø)
superset/examples/multi_line.py 0.00% <0.00%> (-53.85%) ⬇️
superset/utils/encrypt.py 41.46% <0.00%> (-46.54%) ⬇️
superset/commands/importers/v1/examples.py 0.00% <0.00%> (-38.64%) ⬇️
superset/examples/big_data.py 0.00% <0.00%> (-35.00%) ⬇️
superset/examples/misc_dashboard.py 0.00% <0.00%> (-33.34%) ⬇️
superset/examples/utils.py 0.00% <0.00%> (-28.58%) ⬇️
superset/examples/tabbed_dashboard.py 0.00% <0.00%> (-27.59%) ⬇️
superset/examples/bart_lines.py 0.00% <0.00%> (-25.81%) ⬇️
superset/utils/mock_data.py 0.00% <0.00%> (-25.19%) ⬇️
... and 85 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 05d9cde...3941192. Read the comment docs.

@cccs-joel
Copy link
Contributor Author

@villebro I thiiiik you offered some help to write integration tests for that, I would take it!

@geido geido requested a review from villebro January 11, 2022 15:06
@villebro
Copy link
Member

villebro I thiiiik you offered some help to write integration tests for that, I would take it!

@cccs-joel yes, I faintly recall doing that 😄 Let me take a stab at adding a test tomorrow 👍

@pull-request-size pull-request-size bot added size/M and removed size/S labels Jan 26, 2022
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, thanks for the great integration tests!

@villebro villebro merged commit 8b83c7f into apache:master Jan 27, 2022
shcoderAlex pushed a commit to casual-precision/superset that referenced this pull request Feb 7, 2022
…ular (apache#17986)

* Assign an owner when creating a dataset from a csv, excel or columnar

* Added some unit tests

* Code cleanup

* Removed blank line

* Attempt to fix a broken test

* Attempt # 2 to fix a broken test

* Attempt # 3 to fix a broken test

* Attempt # 4 to fix a broken test

* Attempt # 5 to fix a broken test

* Attempt # 6 to fix a broken test

* Broken test fixed, code cleanup
ofekisr pushed a commit to nielsen-oss/superset that referenced this pull request Feb 8, 2022
…ular (apache#17986)

* Assign an owner when creating a dataset from a csv, excel or columnar

* Added some unit tests

* Code cleanup

* Removed blank line

* Attempt to fix a broken test

* Attempt # 2 to fix a broken test

* Attempt # 3 to fix a broken test

* Attempt # 4 to fix a broken test

* Attempt # 5 to fix a broken test

* Attempt # 6 to fix a broken test

* Broken test fixed, code cleanup
bwang221 pushed a commit to casual-precision/superset that referenced this pull request Feb 10, 2022
…ular (apache#17986)

* Assign an owner when creating a dataset from a csv, excel or columnar

* Added some unit tests

* Code cleanup

* Removed blank line

* Attempt to fix a broken test

* Attempt # 2 to fix a broken test

* Attempt # 3 to fix a broken test

* Attempt # 4 to fix a broken test

* Attempt # 5 to fix a broken test

* Attempt # 6 to fix a broken test

* Broken test fixed, code cleanup
@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
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.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants