From 36449a6b242a6389c103e5b4df17da142150a5fb Mon Sep 17 00:00:00 2001 From: Kaxil Naik Date: Fri, 21 Sep 2018 22:04:52 +0100 Subject: [PATCH] [AIRFLOW-3099] Stop Missing Section Errors for optional sections --- 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 fd8765588a602..779c01fc5b5d1 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()