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

Fix config example #10337

Merged
merged 1 commit into from
Oct 5, 2021
Merged

Fix config example #10337

merged 1 commit into from
Oct 5, 2021

Conversation

coignetp
Copy link
Contributor

@coignetp coignetp commented Oct 5, 2021

What does this PR do?

queues and directory are optional if postqueue: true in the init_config, but they don't have a default value.

def _get_config(self, instance):
directory = instance.get('directory', None)
postfix_config_dir = instance.get('config_directory', None)
queues = instance.get('queues', None)
tags = instance.get('tags', [])
if not self.init_config.get('postqueue', False):
self.log.debug('postqueue : get_config')
self.log.debug('postqueue: %s', self.init_config.get('postqueue', False))
if not queues or not directory:
raise Exception('using sudo: missing required yaml config entry')
else:
if not postfix_config_dir:
raise Exception('using postqueue: missing required yaml "config_directory" entry')

Motivation

QA #10051

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

@codecov
Copy link

codecov bot commented Oct 5, 2021

Codecov Report

Merging #10337 (b8bda3b) into master (3e7f81b) will not change coverage.
The diff coverage is n/a.

Flag Coverage Δ
postfix 88.04% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@@ -39,13 +39,16 @@ files:
description: |
Path to the postfix directory. The directory option is required if `postqueue: false` is set. For more
Copy link
Contributor

@hithwen hithwen Oct 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for the release but this needs a custom validator in validators.py and another one for config_directory

@sarah-witt sarah-witt merged commit 65f3a48 into master Oct 5, 2021
@sarah-witt sarah-witt deleted the paul/fix-example branch October 5, 2021 15:13
github-actions bot pushed a commit that referenced this pull request Oct 5, 2021
sarah-witt pushed a commit that referenced this pull request Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants