-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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: dataset after insert when db relation does not exist #21492
fix: dataset after insert when db relation does not exist #21492
Conversation
Codecov Report
@@ Coverage Diff @@
## master #21492 +/- ##
==========================================
- Coverage 66.67% 65.17% -1.50%
==========================================
Files 1791 1793 +2
Lines 68459 68495 +36
Branches 7268 7277 +9
==========================================
- Hits 45643 44644 -999
- Misses 20955 21989 +1034
- Partials 1861 1862 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
SUMMARY
Fixes a regression when loading examples would trigger dataset
after_insert
SQLAlchemy event withdataset.database
asNone
, previously these triggers for creating new permissions were a noop and a second trigger would occur with the expected database relation. Currently the second event does not occur, so this PR will handledataset.database
asNone
by fetching the database model itself.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before: after loading examples, not all datasource access permissions would be created (the number could vary)
After: All permissions are created has expected (23 datasets create 23 datasource access permissions)
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION