Skip to content

Sync alert status to incident status on alert status updates

Sarah Yasonik requested to merge sy-update-incident-status-on-alert-changes into master

What does this MR do and why?

This MR:

  • Links the status between AlertManagement::Alerts & IncidentManagement::IssuableEscalationStatuses so that updates to one will update the other

Changelog is excluded, as feature is behind a feature flag.

Proposed flow for sync

Screen_Shot_2021-12-17_at_1.41.15_PM

How to set up and validate locally

  1. See !76819 (merged) for preliminary setup
  2. Compare results of running the issue update & the alert update:
    ::Issues::UpdateService.new(
      project: project, 
      current_user: user, 
      params: { escalation_status: { status: :resolved } }
    ).execute(incident)
    
    incident.escalation_status.reload.status
    incident.alert_management_alert.reload.status
    ::AlertManagement::Alerts::UpdateService.new(
      incident.alert_management_alert, 
      user, 
      { status: :triggered }
    ).execute(incident)
    
    incident.escalation_status.reload.status
    incident.alert_management_alert.reload.status

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 Vitali Tatarintev

Merge request reports

Loading