-
Notifications
You must be signed in to change notification settings - Fork 684
fix(deps): update github.com/grafana/alerting digest to 5c84f76 (main) #12980
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
base: main
Are you sure you want to change the base?
fix(deps): update github.com/grafana/alerting digest to 5c84f76 (main) #12980
Conversation
f7cf5d3 to
87b7337
Compare
8cc2937 to
2abb899
Compare
2abb899 to
de4608f
Compare
ℹ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
de4608f to
feb456a
Compare
4df4f5e to
4118877
Compare
4118877 to
a0638c3
Compare
a5489b2 to
a294fd6
Compare
a294fd6 to
26a729d
Compare
| newName := getUniqueName(cpy.Name, suffix, usedNames) | ||
| renames[cpy.Name] = newName | ||
| cpy.Name = newName | ||
| usedNames[cpy.Name] = i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Flawed Renaming Logic Causes Conflict Errors
In MergeReceivers, after renaming a receiver, the code sets usedNames[cpy.Name] = i but i refers to the index of the conflicting item that triggered the rename, not the current item's index. This should be usedNames[cpy.Name] = idx to correctly track which incoming receiver now has this name. This can cause incorrect conflict detection for subsequent receivers with the same name, potentially leading to missed renames or incorrect renaming behavior when multiple incoming receivers share the same original name.
3c4ede0 to
9675026
Compare
57c3620 to
4cf0f3f
Compare
| Route: route, | ||
| InhibitRules: inhibitRules, | ||
| MuteTimeIntervals: mergedMuteTime, | ||
| MuteTimeIntervals: a.MuteTimeIntervals, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: MergeTimeIntervals loses incoming mute time intervals
The MergeTimeIntervals function signature was changed to return only ([]config.TimeInterval, map[string]string) instead of ([]config.MuteTimeInterval, []config.TimeInterval, map[string]string). However, the result now uses a.MuteTimeIntervals directly instead of the merged mute time intervals. This causes incoming mute time intervals from configuration b to be silently dropped during the merge, breaking alert routing configurations that depend on mute time intervals from the secondary configuration.
Additional Locations (1)
7b144e8 to
6b3ae36
Compare
6b3ae36 to
cf3bfcf
Compare
cf3bfcf to
b774f8e
Compare
b774f8e to
02419f9
Compare
| v.Grow(len(csvWriter.records)) | ||
| v.SetCap(len(csvWriter.records)) // in case Grow was unnessary, trim down the capacity | ||
| v.SetLen(len(csvWriter.records)) | ||
| reflect.Copy(v, reflect.ValueOf(csvWriter.records)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: CSV unmarshal panics when destination slice has existing elements
The refactored CSV unmarshaling code calls v.SetCap(len(csvWriter.records)) before resetting the slice length. According to Go's reflect documentation, SetCap panics if n is smaller than the current length of the slice. If a caller passes a destination slice that already contains more elements than the incoming CSV records, this will panic. The previous implementation correctly handled this by calling v.SetLen(0) first, then using AppendSlice to populate the data. This is a regression that could cause runtime panics in edge cases where pre-populated slices are reused.
02419f9 to
072ae37
Compare
| } | ||
|
|
||
| return result, renamed | ||
| return usedNames |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Missing nil check causes potential panic in receivers merge
The new createIndexReceivers function accesses .Name on receivers without checking if they're nil. Both loops iterate over existing and incoming slices of pointers, but unlike the calling function MergeReceivers which checks if r == nil, this helper function directly accesses e.Name (line 356) and i.Name (line 359-360). If either slice contains a nil entry, this causes a nil pointer dereference panic.
| s.Versions[i].typeSchema = &s | ||
| } | ||
| return s | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: InitSchema returns struct with dangling pointer references
The InitSchema function receives the schema by value, sets typeSchema pointers on each version to point to the local variable &s, then returns s by value. After the function returns, the typeSchema pointers in the returned struct's Versions still reference the function's stack-local copy of s, which becomes invalid memory. Any subsequent call to GetTypeSchema() or Type() on a version will dereference a dangling pointer, causing undefined behavior or crashes.
ac6a144 to
6633eda
Compare
| if _, err := notifier.Notify(ctx, &testAlert); err != nil { | ||
| return err | ||
| } | ||
| return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Test notifications use integration type instead of receiver name
The TestNotifier function sets context values using notifier.Name(), which returns the integration type (e.g., "slack", "email") rather than the receiver's configured name. The previous implementation used next.ReceiverName from the job struct, which contained the actual receiver name. This causes the group key format and receiver name in context to differ from before, affecting notification history recording which will now show integration types instead of meaningful receiver names. The function lacks a receiverName parameter to preserve the original behavior.
f46c845 to
d29c598
Compare
| var elem any | ||
| item := sliceVal.Index(j) | ||
| if elemType.Kind() == reflect.Ptr { | ||
| elem = item.Elem().Interface() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Reflection panic on nil pointer in slice elements
In ConfigReceiverToMimirIntegrations, when processing slices of pointer types (e.g., []*EmailConfig), the code calls item.Elem().Interface() without checking if item represents a nil pointer. If a slice contains a nil element, item.Elem() returns an invalid reflect.Value, and calling Interface() on it will panic with "reflect: call of reflect.Value.Interface on zero Value".
Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
d29c598 to
7f0563b
Compare
This PR contains the following updates:
d513d62->5c84f76Warning
Some dependencies could not be looked up. Check the warning logs for more information.
Configuration
📅 Schedule: Branch creation - Between 12:00 AM and 04:59 AM, only on Monday ( * 0-4 * * 1 ) (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
Need help?
You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.