Skip to content

Fix segfault on check parse fail in dynamicbeat#316

Merged
s-newman merged 1 commit intoscorestack:devfrom
mav8557:dev
Apr 20, 2021
Merged

Fix segfault on check parse fail in dynamicbeat#316
s-newman merged 1 commit intoscorestack:devfrom
mav8557:dev

Conversation

@mav8557
Copy link
Copy Markdown
Contributor

@mav8557 mav8557 commented Apr 20, 2021

Description

This commit fixes the previous behavior of dynamicbeat crashing when an invalid check is parsed. This is called from dynamicbeat setup checks and would happen when adding checks to elastic, by accessing a null pointer. As the error is passed to Errorf() this still by zap's defaults results in a large stack trace, but dynamicbeat will try to upload the next check as expected. Disabling stack traces on logs like this is possible using the documentation here.

Fixes #305

Merge Checklist

  • I have tested this change locally to make sure it works
  • I have updated the documentation as necessary
  • I have added a release note under the Unreleased section of the Changelog
  • Any relevant labels have been added
  • This PR is being merged into dev, unless it's a PR for a release

@s-newman s-newman merged commit 0b78ae6 into scorestack:dev Apr 20, 2021
@s-newman
Copy link
Copy Markdown
Collaborator

Thanks for the contribution! :)

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

Successfully merging this pull request may close these issues.

2 participants