From f737295a2e97af1594e0c2249c0bad037a9db274 Mon Sep 17 00:00:00 2001 From: Kaxil Naik Date: Fri, 21 Sep 2018 23:30:04 +0100 Subject: [PATCH] [AIRFLOW-3099] Stop Missing Section Errors for optional sections (#3934) --- airflow/bin/cli.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py index fb9ddbe2b003c..dbab8b38d89e9 100644 --- a/airflow/bin/cli.py +++ b/airflow/bin/cli.py @@ -510,9 +510,18 @@ def run(args, dag=None): try: conf.set(section, option, value) except NoSectionError: - log.error('Section {section} Option {option} ' - 'does not exist in the config!'.format(section=section, - option=option)) + optional_sections = [ + 'atlas', 'mesos', 'elasticsearch', 'kubernetes', + 'lineage', 'hive' + ] + if section in optional_sections: + log.debug('Section {section} Option {option} ' + 'does not exist in the config!'.format(section=section, + option=option)) + else: + log.error('Section {section} Option {option} ' + 'does not exist in the config!'.format(section=section, + option=option)) settings.configure_vars()