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

[PoC] Flask Session 0.6 #37767

Closed
wants to merge 1 commit into from
Closed

[PoC] Flask Session 0.6 #37767

wants to merge 1 commit into from

Conversation

Taragolis
Copy link
Contributor

related: #36897

Just an attempt to make work with Flask-Session 0.6.0 and mostly it is unsuccessful.
Random error occurs during the login mechanism, see: tmux-webserver-buffer.txt

Some interesting findings is [database] sql_alchemy_pool_enabled set to False (Postgres only, MySQL will fail with error due to outdated Flask-SQLalchemy) then everything seems works fine, as soon as I return to the default value then it fail with random error, seems like Flask-Session 0.6.0 miss some commit to the DB, and better to wait until 0.7.0


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@Taragolis
Copy link
Contributor Author

This PR was just to show that something wrong with Flask Session 0.6.0 and we should not to spend much time on it and better wait next version.

@Taragolis Taragolis closed this Feb 28, 2024
@potiuk
Copy link
Member

potiuk commented Feb 28, 2024

Yes. 0.6.0 is completely broken.

@Lxstr
Copy link

Lxstr commented Mar 3, 2024

I have 0.7.0rc1 now available. I would appreciate any help with the SQLAlchemy interface. I do not personally use SQLAlchemy but I've tried to fix a number of issues and also add cleanup functionality.

It should only save sessions when there is an actual value set to the session. So there should be no more need for Airflow's SessionExemptMixin.

Also note I have had to change to interfaces from flask_session.SQLAlchemySessionInterface to flask_session.sqlalchemy.SqlAlchemySessionInterface for maintainability. The params should be backwards compatible though.

@Lxstr
Copy link

Lxstr commented Mar 3, 2024

@Taragolis Taragolis deleted the flask-session-060 branch April 2, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:webserver Webserver related Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants