Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIRFLOW-3099] Stop Missing Section Errors for optional sections #3934

Merged
merged 1 commit into from
Sep 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[AIRFLOW-3099] Stop Missing Section Errors for optional sections
  • Loading branch information
kaxil committed Sep 21, 2018
commit 36449a6b242a6389c103e5b4df17da142150a5fb
15 changes: 12 additions & 3 deletions airflow/bin/cli.py
Original file line number Diff line number Diff line change
@@ -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()