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

[logging] deprecation notices for SQLite #9662

Merged

Conversation

lilykuang
Copy link
Member

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

Support for SQLite as a metadata database will be officially removed. SQLite may still be usable, but it will not be supported in future Alembic migrations. This PR is following step 1 on Immediate: plans from [SIP-33] #8874

  • Add logging to indicate SQLite’s deprecation in the next version release

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

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

REVIEWERS

@willbarrett

Copy link
Member

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

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

I'd recommend using logger.warn throughout instead of logger.info, once you make the change though, it lgtm

@lilykuang
Copy link
Member Author

Thank you @etr2460. It seems like logging.warn() has been deprecated for Python 3.4+, will use logger.warning

@lilykuang lilykuang requested a review from etr2460 April 27, 2020 17:29
Copy link
Member

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

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

lgtm, didn't realize that logger.warn was deprecated. logger.warning is great!

config.set_main_option("sqlalchemy.url", current_app.config["SQLALCHEMY_DATABASE_URI"])
DATABASE_URI = current_app.config["SQLALCHEMY_DATABASE_URI"]
if "sqlite" in DATABASE_URI:
logger.warning("SQLite DB support may not be supported by in future version")
Copy link
Member

Choose a reason for hiding this comment

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

Grammar nit: could we use "SQLite Database support for metadata databases will be removed in a future version of Superset."

Copy link
Member

@willbarrett willbarrett left a comment

Choose a reason for hiding this comment

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

LGTM aside from one grammar nit :)

@lilykuang lilykuang force-pushed the lily/feature/deprecation-notices-SQLite branch from 8246607 to f5c5695 Compare April 27, 2020 21:07
@lilykuang lilykuang force-pushed the lily/feature/deprecation-notices-SQLite branch from f5c5695 to 86e5cfe Compare April 27, 2020 21:23
@pull-request-size pull-request-size bot added size/M and removed size/S labels Apr 27, 2020
@lilykuang lilykuang closed this Apr 27, 2020
@lilykuang lilykuang reopened this Apr 27, 2020
@codecov-io
Copy link

codecov-io commented Apr 27, 2020

Codecov Report

Merging #9662 into master will increase coverage by 0.00%.
The diff coverage is 44.44%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9662   +/-   ##
=======================================
  Coverage   70.53%   70.53%           
=======================================
  Files         574      581    +7     
  Lines       30152    30222   +70     
  Branches     3066     3072    +6     
=======================================
+ Hits        21267    21317   +50     
- Misses       8774     8794   +20     
  Partials      111      111           
Flag Coverage Δ
#cypress 53.65% <ø> (-0.12%) ⬇️
#javascript 58.75% <ø> (-0.02%) ⬇️
#python 70.61% <44.44%> (+0.05%) ⬆️
Impacted Files Coverage Δ
superset/migrations/env.py 0.00% <0.00%> (ø)
superset/sql_lab.py 78.07% <80.00%> (+0.29%) ⬆️
...rset-frontend/src/explore/controlPanels/Heatmap.js 33.33% <0.00%> (-66.67%) ⬇️
...rontend/src/SqlLab/components/QueryAutoRefresh.jsx 65.90% <0.00%> (-6.82%) ⬇️
superset/db_engine_specs/mssql.py 93.02% <0.00%> (-1.10%) ⬇️
superset/tasks/schedules.py 79.32% <0.00%> (-0.78%) ⬇️
superset/jinja_context.py 74.00% <0.00%> (-0.45%) ⬇️
superset/connectors/druid/models.py 82.59% <0.00%> (-0.20%) ⬇️
superset/connectors/sqla/models.py 88.51% <0.00%> (-0.02%) ⬇️
superset/views/tags.py 35.13% <0.00%> (ø)
... and 30 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 7386b01...86e5cfe. Read the comment docs.

@lilykuang lilykuang closed this Apr 28, 2020
@lilykuang lilykuang reopened this Apr 28, 2020
@craig-rueda craig-rueda merged commit b27a81e into apache:master Apr 28, 2020
@craig-rueda craig-rueda deleted the lily/feature/deprecation-notices-SQLite branch April 28, 2020 21:28
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.37.0 labels Feb 28, 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 🚢 0.37.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants