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

Suppress SQLALCHEMY_TRACK_MODIFICATIONS warning in db init #26617

Merged

Conversation

dstandish
Copy link
Contributor

@dstandish dstandish commented Sep 23, 2022

We already have it set false in the main flask app config, but now that we do db init from orm, and we create a distinct flask app for that, and it doesn't get the same setting.

Closes #26544

Seems much easier to just duplicate the setting than to try and DRY it?

Gets rid of this warning:

image

We already have it set false in the main flask app config, but now that we do db init from orm, and we create a distinct flask app for that, and it doesn't get the same setting.

Closes apache#26544
Copy link
Member

@uranusjr uranusjr left a comment

Choose a reason for hiding this comment

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

Honestly it’s weird we even need to create a Flask object to init db at all, but Flask and SQLAlchemy things are always quite badly entangled.

@dstandish dstandish merged commit 051ba15 into apache:main Sep 23, 2022
@dstandish dstandish deleted the flask-sqlalchemy-track-modifications-warning branch September 23, 2022 07:18
@jedcunningham jedcunningham added this to the Airflow 2.4.1 milestone Sep 23, 2022
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Sep 23, 2022
jedcunningham pushed a commit that referenced this pull request Sep 23, 2022
We already have it set false in the main flask app config, but now that we do db init from orm, and we create a distinct flask app for that, and it doesn't get the same setting.

Closes #26544

(cherry picked from commit 051ba15)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Choose setting for sqlalchemy SQLALCHEMY_TRACK_MODIFICATIONS
3 participants