From commits-return-24878-archive-asf-public=cust-asf.ponee.io@airflow.incubator.apache.org Wed Oct 10 11:28:50 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3AC2618067A for ; Wed, 10 Oct 2018 11:28:50 +0200 (CEST) Received: (qmail 8132 invoked by uid 500); 10 Oct 2018 09:28:49 -0000 Mailing-List: contact commits-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list commits@airflow.incubator.apache.org Received: (qmail 8123 invoked by uid 99); 10 Oct 2018 09:28:49 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Oct 2018 09:28:49 +0000 From: GitBox To: commits@airflow.apache.org Subject: [GitHub] kaxil commented on a change in pull request #4028: [AIRFLOW-3099] Don't ever warn about missing sections of config Message-ID: <153916372875.28552.160393647674402485.gitbox@gitbox.apache.org> Date: Wed, 10 Oct 2018 09:28:48 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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, `` 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