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 if ParseRangeCheck returns nil #236

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

Tommi2Day
Copy link

this PR adds checking of nil returns from ParseRangeString in EvaluateThreshold. it returns UNKNOWN state result and an error message.

second I added 2 tests to check this expected behavior

fixes #233, replace #234

@Tommi2Day Tommi2Day changed the title Fix/issue233 Fix panic if ParseRangeCheck returns nil Jan 16, 2024
@atc0005 atc0005 self-requested a review January 17, 2024 12:43
@atc0005 atc0005 added this to the Next Release milestone Jan 17, 2024
@atc0005 atc0005 self-assigned this Jan 17, 2024
@atc0005 atc0005 added bug Something isn't working tests range thresholds labels Jan 17, 2024
range.go Show resolved Hide resolved
@atc0005
Copy link
Owner

atc0005 commented Jan 17, 2024

Hi @Tommi2Day,

Thanks for your work on this.

Do you feel comfortable squashing the first and third commits together? If not, no problem: we can retain them and merge as-is.

@Tommi2Day
Copy link
Author

did a rebase and force upload, hopefully it is following your intention

@atc0005 atc0005 self-requested a review January 18, 2024 23:08
@atc0005
Copy link
Owner

atc0005 commented Jan 18, 2024

@Tommi2Day Thanks again!

@atc0005 atc0005 merged commit 38f7549 into atc0005:master Jan 18, 2024
28 of 30 checks passed
@Tommi2Day Tommi2Day deleted the fix/issue233 branch January 25, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working range tests thresholds
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic in EvaluateThreshold because of unvalidated ParseRangeString return value
2 participants