Skip to content

Move pending escalation into method on model

What does this MR do and why?

This MR moves the behavior for deleting pending escalations to a method on the pending escalation base class. This change makes it easier to delete pending escalations for multiple alerts or issues simultaneously with one SQL query. This will be taken advantage of in a future MR to remove an N+1 when processing alert notifications.

Related issue: https://gitlab.com/gitlab-org/gitlab/-/issues/348676

How to set up and validate locally

  1. Setup an escalation policy in a project for which you have maintainer+ permissions
  2. Setup the policy to immediately notify a user after 0 minutes, and again after 3 minutes
  3. Open an existing incident or create a new incident (new issue of type incident)
  4. Set the Escalation policy on the incident
  5. Mark the incident status as Resolved
  6. The system notes on the incident should indicate that the user was notified only once. There should NOT be a 2nd notification after 3 minutes.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sarah Yasonik

Merge request reports

Loading