ashb commented on a change in pull request #12332:
URL: https://github.com/apache/airflow/pull/12332#discussion_r523412431
##########
File path: airflow/settings.py
##########
@@ -337,6 +337,33 @@ def prepare_syspath():
sys.path.append(PLUGINS_FOLDER)
+def get_session_lifetime_config():
+ """Gets session timeout configs and handles outdated configs gracefully."""
+ session_lifetime_minutes = conf.get('webserver',
'session_lifetime_minutes', fallback=None)
+ session_lifetime_days = conf.get('webserver', 'session_lifetime_days',
fallback=None)
+ uses_deprecated_lifetime_configs = session_lifetime_days or conf.get(
+ 'webserver', 'force_logout_after', fallback=None
+ )
+
+ if uses_deprecated_lifetime_configs and not session_lifetime_minutes:
Review comment:
Hmmm, this is never going to trigger -- the default_airflow.cfg has a
value of `session_lifetime_minutes`, which means that `conf.get('webserver',
'session_lifetime_minutes')` is always going to return a value (`43200`). HMMMM.
Perhaps we need a
```suggestion
if uses_deprecated_lifetime_configs and session_lifetime_minutes ==
'43200':
```
(I don't like it, but I can't see another option)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]