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

Elastic exceptions may not lead to a failure exit status #574

Open
jdnurmi opened this issue Oct 25, 2024 · 1 comment
Open

Elastic exceptions may not lead to a failure exit status #574

jdnurmi opened this issue Oct 25, 2024 · 1 comment

Comments

@jdnurmi
Copy link

jdnurmi commented Oct 25, 2024

Use case:

  • Emails are delivered to a shared filesystem available to a pod running (similar to a Maildir)
  • For each file, call parsedmarc - which is configured to emit reports to ElasticSearch, and on exit 0, delete the file.

Problem:
Parsedmarc doesn't always exit non-zero on failure, even when its only configuration is to write reports.

Traceback led me to cli.py:133, and it looks like exception swallowing happens a lot here - so I didn't know what sort of patch might be accepted upstream.

For now I wrapped the whole thing in a grep for 'Elasticsearch (exception|Error)' to determine if it was successful - but figured I'd open this up for discussion -- but also my use-case is weird, so it may not be applicable to many other people.

@nhairs
Copy link
Contributor

nhairs commented Oct 25, 2024

Hi @jdnurmi,

You may be interested in an experimental fork I've been working on which does have a feedback mechanism for failed processing by Elasticsearch (or any of the destinations) so that the source of the reports can appropriately handle them.

nhairs/parsedmarc-fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants