[
https://issues.apache.org/jira/browse/AIRFLOW-1485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Allison Wang closed AIRFLOW-1485.
---------------------------------
Resolution: Fixed
> Get configuration throws exceptions when key does not exist
> -----------------------------------------------------------
>
> Key: AIRFLOW-1485
> URL: https://issues.apache.org/jira/browse/AIRFLOW-1485
> Project: Apache Airflow
> Issue Type: Bug
> Reporter: Allison Wang
>
> Airflow configuration get method throws exceptions when the key is not
> defined in airflow.cfg. This behavior makes adding new, optional
> configuration difficult given people already have their own airflow.cfg. We
> should probably have another method to return an empty string instead of
> throwing exceptions when there is no such key in airflow config.
> {code}
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in
> wsgi_app
> response = self.full_dispatch_request()
> File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in
> full_dispatch_request
> rv = self.handle_user_exception(e)
> File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in
> handle_user_exception
> reraise(exc_type, exc_value, tb)
> File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in
> full_dispatch_request
> rv = self.dispatch_request()
> File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in
> dispatch_request
> return self.view_functions[rule.endpoint](**req.view_args)
> File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 68,
> in inner
> return self._run_view(f, *args, **kwargs)
> File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line
> 367, in _run_view
> return fn(self, *args, **kwargs)
> File "/usr/local/lib/python2.7/dist-packages/flask_login.py", line 755, in
> decorated_view
> return func(*args, **kwargs)
> File "/usr/local/lib/python2.7/dist-packages/airflow/www/utils.py", line
> 125, in wrapper
> return f(*args, **kwargs)
> File "/usr/local/lib/python2.7/dist-packages/airflow/www/views.py", line
> 873, in log
> if conf.get('core', 'logging_backend_url'):
> File "/usr/local/lib/python2.7/dist-packages/airflow/configuration.py",
> line 802, in get
> return conf.get(section, key, **kwargs)
> File "/usr/local/lib/python2.7/dist-packages/airflow/configuration.py",
> line 615, in get
> "in config".format(**locals()))
> AirflowConfigException: section/key [core/logging_backend_url] not found in
> config
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)