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 panic for case when no metrics are returned #110

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

lwalter
Copy link
Contributor

@lwalter lwalter commented Nov 25, 2024

Hello!

Thank you for creating this project, it's been helpful for monitoring our Humio clusters. However I did notice a panic for cases where some more complex queries might not have a metric for a particular timespan. In this case the exporter would panic when trying access the Events array at element 0.

I've introduced a fix which will simply continue for this particular case and have verified it in my own environment.

Please let me know if I can assist with getting this merged ASAP.

Much appreciated!

@lwalter lwalter requested a review from a team as a code owner November 25, 2024 17:58
@lwalter
Copy link
Contributor Author

lwalter commented Nov 25, 2024

This closes #30

@JacobValdemar JacobValdemar linked an issue Nov 26, 2024 that may be closed by this pull request
Copy link
Member

@JacobValdemar JacobValdemar left a comment

Choose a reason for hiding this comment

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

Thank you very much for this generous contribution @lwalter! Everything looks good, so I am merging it and creating a new release 🚀

@JacobValdemar
Copy link
Member

@lwalter can I get you to sign your commits? The base branch requires all commits to be signed. Learn more about signing commits.

Remove extra whitespace
Depending on the configured query and particular timespan, it is
possible for no metrics to be returned. Which in the previous
implementation would cause a panic. This commit gracefully handles the
scenario by continuing to the next query job in this particular case.
@lwalter
Copy link
Contributor Author

lwalter commented Nov 26, 2024

@JacobValdemar Apologies, I have signed and re-pushed the commits to this branch. I can see that they are "Verified".

Once this branch is merged will a new release branch be created automatically by the build pipeline? If not, how can I get one created?

Thanks!

@JacobValdemar
Copy link
Member

@lwalter Thanks! I will make sure to create a new release and publish the images 😊

@JacobValdemar JacobValdemar merged commit 612e273 into lunarway:master Nov 27, 2024
2 checks passed
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.

HumioExporter crashes if aggregated query contains no rows
2 participants