You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2018/09/21 22:30:06 UTC

[GitHub] kaxil closed pull request #3934: [AIRFLOW-3099] Stop Missing Section Errors for optional sections

kaxil closed pull request #3934: [AIRFLOW-3099] Stop Missing Section Errors for optional sections
URL: https://github.com/apache/incubator-airflow/pull/3934
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py
index fd8765588a..779c01fc5b 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()
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services