Skip to content

Conversation

@dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Jan 8, 2021

SUMMARY

Load examples is creating unnecessary main database connection record

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov-io
Copy link

codecov-io commented Jan 8, 2021

Codecov Report

Merging #12351 (34e83f8) into master (d760e88) will decrease coverage by 4.25%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            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     
Flag Coverage Δ
cypress ?
javascript 60.67% <ø> (-0.32%) ⬇️
python 64.19% <50.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
superset/datasets/commands/importers/v1/utils.py 55.55% <50.00%> (ø)
superset-frontend/src/SqlLab/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/explore/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/dashboard/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/chart/ChartContainer.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/explore/reducers/index.js 0.00% <0.00%> (-100.00%) ⬇️
...et-frontend/src/dashboard/containers/Dashboard.jsx 0.00% <0.00%> (-100.00%) ⬇️
...t-frontend/src/dashboard/containers/SliceAdder.jsx 0.00% <0.00%> (-100.00%) ⬇️
...t-frontend/src/explore/reducers/getInitialState.js 0.00% <0.00%> (-100.00%) ⬇️
...-frontend/src/visualizations/presets/MainPreset.js 0.00% <0.00%> (-100.00%) ⬇️
... and 201 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 d760e88...34e83f8. Read the comment docs.

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 after fixing lint

@dpgaspar dpgaspar requested a review from betodealmeida January 8, 2021 12:56
@dpgaspar dpgaspar marked this pull request as ready for review January 8, 2021 13:21
@dpgaspar dpgaspar merged commit f354bb3 into apache:master Jan 8, 2021
@dpgaspar dpgaspar deleted the fix/load_data_main branch January 8, 2021 21:57

# 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:
Copy link
Member

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().

betodealmeida added a commit to betodealmeida/incubator-superset that referenced this pull request Jan 22, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 First shipped in 1.0.0 labels Mar 12, 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 preset-io size/XS 🚢 1.0.0 First shipped in 1.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants