Skip to content

[🐛 Bug]: Missing explicit is_predicted=True when creating topology based incident #6511

@PrometheRus

Description

@PrometheRus

Describe the bug

In keep/topologies/topology_processor.py, when creating an Incident with incident_type="topology" , the is_predicted flag is not set. In the ORM model (keep/api/models/db/incident.py), this field defaults to False.

Because of this, topology incidents are incorrectly marked as unpredicted, even though they are, in fact, the result of correlation analysis based on service topology.

To Reproduce

  1. Open keep/topologies/topology_processor.py.
  2. Check the Incident constructor call in _create_application_based_incident.
  3. Observe that is_predicted is absent, while is_visible=True and is_candidate=False are present.
  4. Check keep/api/models/db/incident.pyis_predicted defaults to False.

Expected behavior
When creating a topological incident, is_predicted=True must be explicitly specified, since the incident is generated algorithmically based on the topological dependency of services, and not by the direct triggering of a custom alert or rule.

Screenshots

Additional context

Version: 0.51.0 | Build: 0cfb50

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions