Commit dd21d43
fix: address PR review comments
- Remove redundant EndsAt assignment in types/types.go (res is already a copy of o)
- Fix overlap check to handle equal StartsAt timestamps using !Before instead of After
- Replace isUpdate check with more specific isResolving check that only allows
merging when an alert is being resolved (endsAt set and old alert doesn't have
it, or new endsAt is earlier than old endsAt), preventing arbitrary updates
based solely on UpdatedAt timestamp
Fixes review comments from #4717
Signed-off-by: Andrew Leng <work@Andrews-MacBook-Air.local>1 parent b5ff56e commit dd21d43
2 files changed
+13
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
250 | 252 | | |
251 | | - | |
252 | | - | |
253 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
254 | 258 | | |
255 | | - | |
| 259 | + | |
256 | 260 | | |
257 | 261 | | |
258 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
| 458 | + | |
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| |||
0 commit comments