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: create virtual dataset validation #26625

Merged
merged 3 commits into from
Jan 17, 2024

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Jan 15, 2024

SUMMARY

Adds a validation on create virtual virtual datasets to check SQL data access

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

Copy link

codecov bot commented Jan 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c947be3) 69.16% compared to head (0aede7c) 69.17%.
Report is 12 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #26625   +/-   ##
=======================================
  Coverage   69.16%   69.17%           
=======================================
  Files        1948     1948           
  Lines       76062    76079   +17     
  Branches     8493     8493           
=======================================
+ Hits        52609    52626   +17     
  Misses      21273    21273           
  Partials     2180     2180           
Flag Coverage Δ
hive 53.68% <50.00%> (-0.01%) ⬇️
mysql 78.07% <100.00%> (+0.01%) ⬆️
postgres 78.17% <100.00%> (+0.01%) ⬆️
presto 53.63% <50.00%> (-0.01%) ⬇️
python 82.86% <100.00%> (+<0.01%) ⬆️
sqlite 77.76% <100.00%> (+0.01%) ⬆️
unit 55.88% <50.00%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

First pass comment related to the test mocks

Comment on lines 592 to 593
mock_g.user = security_manager.find_user("gamma")
mock_g2.user = mock_g.user
Copy link
Member

Choose a reason for hiding this comment

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

Instead of mocking, couldn't we use with override_user(user) here?

Copy link
Member Author

Choose a reason for hiding this comment

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

changed, and changed all on security_tests.py also

Copy link
Member

@craig-rueda craig-rueda left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Interesting solution 👍 Thanks for cleaning up the old tests!

@dpgaspar dpgaspar merged commit 8e19f59 into apache:master Jan 17, 2024
33 checks passed
@dpgaspar dpgaspar deleted the fix/dataset-create-validation branch January 17, 2024 09:11
@dpgaspar dpgaspar added v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch labels Jan 17, 2024
@michael-s-molina michael-s-molina added v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch and removed v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch labels Jan 17, 2024
michael-s-molina pushed a commit that referenced this pull request Jan 18, 2024
Muhammed-baban pushed a commit to intellica-tech/reporting-tool that referenced this pull request Jan 19, 2024
@mistercrunch mistercrunch added 🍒 3.0.4 🍒 3.1.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Mar 8, 2024
sfirke pushed a commit to sfirke/superset that referenced this pull request Mar 22, 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 v3.0 Label added by the release manager to track PRs to be included in the 3.0 branch v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch 🍒 3.0.4 🍒 3.1.1 🍒 3.1.2 🍒 3.1.3 🚢 4.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants