Skip to content

Conversation

@rohang98
Copy link
Contributor

@rohang98 rohang98 commented Jan 9, 2023

To prevent panics caused by null-pointer exceptions for empty array objects, I used @simonpasquier's suggestion by changing the arrays to slices of value items instead of pointer items.

Fixes #3204

@rohang98 rohang98 force-pushed the pointer-to-value-fix branch 2 times, most recently from 516115d to bd17255 Compare January 9, 2023 21:34
@rohang98
Copy link
Contributor Author

@simonpasquier could you please take a look whenever you get the chance!

Copy link
Member

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

lgtm, the test failures are unrelated to your change and investigated in #3216

at.Run()
}

func TestEmptyInhibitionRule(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

We can keep only the test in test/with_api_v2/acceptance since it's irrespective of the API versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review! Removed the test.

@rohang98 rohang98 force-pushed the pointer-to-value-fix branch from bd17255 to 7772afb Compare January 16, 2023 16:39
@simonpasquier
Copy link
Member

could you rebase on top of main please? it should help for the failing CI test.

@rohang98 rohang98 force-pushed the pointer-to-value-fix branch from 7772afb to df1dc0d Compare January 18, 2023 15:22
@rohang98
Copy link
Contributor Author

@simonpasquier looks like the tests all pass now.

@simonpasquier simonpasquier merged commit 0f7d21f into prometheus:main Jan 19, 2023
@simonpasquier
Copy link
Member

thanks!

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.

Nil inhibit rule in alertmanager configuration causing alertmanager pods to crash because of NPE

2 participants