airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] kaxil commented on a change in pull request #4028: [AIRFLOW-3099] Don't ever warn about missing sections of config
Date Wed, 10 Oct 2018 09:15:36 GMT
kaxil commented on a change in pull request #4028: [AIRFLOW-3099] Don't ever warn about missing
sections of config
URL: https://github.com/apache/incubator-airflow/pull/4028#discussion_r223997151
 
 

 ##########
 File path: airflow/bin/cli.py
 ##########
 @@ -519,25 +500,7 @@ def run(args, dag=None):
         if os.path.exists(args.cfg_path):
             os.remove(args.cfg_path)
 
-        # Do not log these properties since some may contain passwords.
-        # This may also set default values for database properties like
-        # core.sql_alchemy_pool_size
-        # core.sql_alchemy_pool_recycle
-        for section, config in conf_dict.items():
-            for option, value in config.items():
-                try:
-                    conf.set(section, option, value)
-                except NoSectionError:
-                    no_section_msg = (
-                        'Section {section} Option {option} '
-                        'does not exist in the config!'
-                    ).format(section=section, option=option)
-
-                    if section in OPTIONAL_AIRFLOW_CFG_SECTIONS:
-                        log.debug(no_section_msg)
-                    else:
-                        log.error(no_section_msg)
-
+        conf.conf.read_dict(conf_dict, source=args.cfg_path)
 
 Review comment:
   Not sure on `source=args.cfg_path` ..
   
   >Optional argument source specifies a context-specific name of the dictionary passed.
If not given, <dict> is used.
   
   What does `source=args.cfg_path`  do in our case?

----------------------------------------------------------------
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

Mime
View raw message