Skip to content

[🐛 Bug]: Resolve ON - Incidents #5325

@diegovb-sys

Description

@diegovb-sys

Describe the bug
The resolve on Last and First alert is relaying on the is_edge_incident_resolved().
There are 2 sub-issues.

On of them is about the compatibility with Postgres, due to the having with the max() function and the group_by.

The other is the logical behind it.

The First Resolved should evaluate the first alert received. Nevertheless, the idea here (in the code) is to select the oldest Alert, but if I've received an update to that fingerprint, the oldest and hence the First will be other...

The Last Resolved should evaluate either the last alert, in overall received, or the last alert by fingerprint. Nevertheless, here we have again a mismatch.

To finalize, the test shows this mismatch. Focusing on test_incident_resolution_on_edge test, and the (ResolveOn.LAST.value, ("fp2", "fp1")) parameters:

  1. FP1 Firing alert comes.
  2. FP2 Firing alert comes.
  3. FP2 Resolved alert comes.

This asserts Firing, but the Last alert is FP2.. so the incident should be resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions