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

Choose setting for sqlalchemy SQLALCHEMY_TRACK_MODIFICATIONS #26544

Closed
1 task done
dstandish opened this issue Sep 21, 2022 · 3 comments · Fixed by #26617
Closed
1 task done

Choose setting for sqlalchemy SQLALCHEMY_TRACK_MODIFICATIONS #26544

dstandish opened this issue Sep 21, 2022 · 3 comments · Fixed by #26617
Labels
kind:meta High-level information important to the community

Comments

@dstandish
Copy link
Contributor

Body

We need to determine what to do about this warning:

/Users/dstandish/.virtualenvs/2.4.0/lib/python3.8/site-packages/flask_sqlalchemy/__init__.py:872 FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.

Should we set to true or false?

@ashb @potiuk @jedcunningham @uranusjr

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.
@dstandish dstandish added the kind:meta High-level information important to the community label Sep 21, 2022
@dstandish dstandish changed the title Determine desired setting for sqlalchemy SQLALCHEMY_TRACK_MODIFICATIONS Coose setting for sqlalchemy SQLALCHEMY_TRACK_MODIFICATIONS Sep 21, 2022
@dstandish dstandish changed the title Coose setting for sqlalchemy SQLALCHEMY_TRACK_MODIFICATIONS Choose setting for sqlalchemy SQLALCHEMY_TRACK_MODIFICATIONS Sep 21, 2022
@potiuk
Copy link
Member

potiuk commented Sep 21, 2022

Looking at the answers here https://stackoverflow.com/questions/33738467/how-do-i-know-if-i-can-disable-sqlalchemy-track-modifications, we should set it to False. From what I checked, we do not seem to use "models_committed" or "before_models_committed" anywhere - neither Airflow nor any other dependency uses it (except flask_sqlalchemy that defines it of course).

@ashb
Copy link
Member

ashb commented Sep 21, 2022

Agreed, False.

@dstandish
Copy link
Contributor Author

Turns out 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, it doesn't get the same setting....

dstandish added a commit to astronomer/airflow that referenced this issue 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 apache#26544
dstandish added a commit that referenced this issue 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
jedcunningham pushed a commit that referenced this issue 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
kind:meta High-level information important to the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants