You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ryan Vandersmith (Jira)" <ji...@apache.org> on 2019/11/07 19:23:00 UTC
[jira] [Created] (AIRFLOW-5867) [--debug] unit_test_mode
configuration interpreted as str instead of bool
Ryan Vandersmith created AIRFLOW-5867:
-----------------------------------------
Summary: [--debug] unit_test_mode configuration interpreted as str instead of bool
Key: AIRFLOW-5867
URL: https://issues.apache.org/jira/browse/AIRFLOW-5867
Project: Apache Airflow
Issue Type: Bug
Components: cli
Affects Versions: 1.10.6
Reporter: Ryan Vandersmith
Assignee: Ryan Vandersmith
Fix For: 1.10.7
The `--debug` CLI argument appears to have unintended functionality:
[https://github.com/apache/airflow/blob/master/airflow/bin/cli.py#L980]
{code:python}
if args.debug:
print(
"Starting the web server on port {0} and host {1}.".format(
args.port, args.hostname))
app, _ = create_app(None, testing=conf.get('core', 'unit_test_mode'))
app.run(debug=True, use_reloader=not app.config['TESTING'],
port=args.port, host=args.hostname,
ssl_context=(ssl_cert, ssl_key) if ssl_cert and ssl_key else None)
{code}
Because `testing` and consequently `app.config['TESTING']` are provided as a `str` object, the reloader is only enabled when the `unit_test_mode` property is an empty string.
A very clean fix exists (line 979):
{code:java}
app, _ = create_app(None, testing=conf.getboolean('core', 'unit_test_mode'))
{code}
I will submit a pull request with the above change immediately after opening this issue.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)