-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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(load examples): load examples creating unnecessary main database #12351
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12351 +/- ##
==========================================
- Coverage 67.05% 62.80% -4.26%
==========================================
Files 1001 1014 +13
Lines 49380 49494 +114
Branches 5033 5070 +37
==========================================
- Hits 33112 31083 -2029
- Misses 16140 18202 +2062
- Partials 128 209 +81
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after fixing lint
@@ -136,7 +136,7 @@ def load_data( | |||
df[column_name] = pd.to_datetime(df[column_name]) | |||
|
|||
# reuse session when loading data if possible, to make import atomic | |||
if example_database.sqlalchemy_uri == get_main_database().sqlalchemy_uri: | |||
if example_database.sqlalchemy_uri == get_example_database().sqlalchemy_uri: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dpgaspar this condition will always be true, and causes the example data to be loaded into the main database instead of the examples databases (because it always reuses session.connection()
.
…atabase (apache#12351)" This reverts commit f354bb3.
SUMMARY
Load examples is creating unnecessary
main
database connection recordADDITIONAL INFORMATION