Merged
Conversation
Fixing panic ``` runtime error: invalid memory address or nil pointer dereference /usr/local/go/src/runtime/panic.go:262 runtime.panicmem() /usr/local/go/src/runtime/signal_unix.go:925 runtime.sigpanic() /build/pint/checks/rule_label.go:107 ```
Collaborator
|
Thanks, can you share a test rule file so I can add a test for this? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1696 +/- ##
=======================================
Coverage 99.56% 99.56%
=======================================
Files 109 109
Lines 13203 13203
=======================================
Hits 13146 13146
Misses 32 32
Partials 25 25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@prymitive sure! Pint rule: rule {
match {
kind = "recording"
# I guess you can omit this
name = "alert:[\\w\\-]+:[\\w\\-]+"
}
label "service" {
severity = "bug"
required = true
}
}Recording rule: groups:
- name: has group but no local
labels:
some: random
rules:
- record: alert:http_success_rate:ratio_2m
expr: sum by(job) (up == 1)I think this MRE will be good enough. |
Contributor
Author
|
TY 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixing panic
It happens when group has labels but recording rule hasn't.