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

SESSION_REFRESH_EACH_REQUEST parameter is not working with sql queries run in sqllab #7619

Closed
dejv13 opened this issue May 30, 2019 · 4 comments
Labels
!deprecated-label:bug Deprecated label - Use #bug instead inactive Inactive for >= 30 days

Comments

@dejv13
Copy link

dejv13 commented May 30, 2019

SESSION_REFRESH_EACH_REQUEST parameter is not working with sql queries run in sqllab.
We have setup SESSION_REFRESH_EACH_REQUEST in superset config to True to renew PERMANENT_SESSION_LIFETIME after each query in Sqllab.

Expected results
We expect that via setup SESSION_REFRESH_EACH_REQUEST = True , the session lifetime will be renewed with each sql query action in sql lab.

Actual results
At this moment we have configured
PERMANENT_SESSION_LIFETIME = 1800
and SESSION_REFRESH_EACH_REQUEST = True but these two parameters are working together when (in the 30 min time window) we e.g. change the tab in superset. When we are working in SQL Lab the session expires after 30 mins no matter how many queries are executed.

Environment

(please complete the following information):

  • superset version: [0.28.1]
  • python version: Python 3.6.8

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • [ X] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [X ] I have reproduced the issue with at least the latest released version of superset.
  • [X ] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Add any other context about the problem here.

@issue-label-bot issue-label-bot bot added the !deprecated-label:bug Deprecated label - Use #bug instead label May 30, 2019
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.89. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@stale
Copy link

stale bot commented Jul 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Jul 29, 2019
@stale stale bot closed this as completed Aug 5, 2019
@shawnzhu
Copy link
Contributor

It still doesn't work under superset 1.2.0. expected expiration time for cookie session after using PERMANENT_SESSION_LIFETIME and SESSION_REFRESH_EACH_REQUEST

I saw the code from Flask where it must make session.permanent = True to get expiration time. see https://github.com/pallets/flask/blob/a430c43736ab029b472c9641aa0b6203638391c2/src/flask/sessions.py#L264-L274

So I wonder if this is something can be done in superset codebase

@shawnzhu
Copy link
Contributor

commented in #5149 (comment) and please checkout #16286 to see how to setup session.permanent by using FLASK_APP_MUTATOR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
!deprecated-label:bug Deprecated label - Use #bug instead inactive Inactive for >= 30 days
Projects
None yet
Development

No branches or pull requests

2 participants