mb-m commented on a change in pull request #5289: [AIRFLOW-4517] allow for
airflow config to influence flask configuration
URL: https://github.com/apache/airflow/pull/5289#discussion_r292986385
##########
File path: airflow/bin/cli.py
##########
@@ -857,21 +857,31 @@ def webserver(args):
if ssl_cert and not ssl_key:
raise AirflowException(
'An SSL key must also be provided for use with ' + ssl_cert)
+ flask_web_config = conf.getsection('flask_web')
+ if flask_web_config:
+ flask_web_upper_update = {}
+ for k in flask_web_config:
+ K = k.upper()
+ if k != K:
+ flask_web_upper_update[k] = K
+ for k in flask_web_upper_update:
+ flask_web_config[flask_web_upper_update[k]] = flask_web_config[k]
+ del flask_web_config[k]
Review comment:
The flask config names are upper-cased
(http://flask.pocoo.org/docs/1.0/config), but the airflow ones are lower-cased.
When you get variables set by environment (same as many other airflow configs),
you want these to operate in the correct way too. Unfortunately the handler for
environment in config has already lower-cased them by this point.
----------------------------------------------------------------
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]
With regards,
Apache Git Services