From a5e6b60d45a28e6597513fb53240a9db2a443084 Mon Sep 17 00:00:00 2001 From: d-g-town <66391417+d-g-town@users.noreply.github.com> Date: Sat, 17 Feb 2024 15:47:47 -0500 Subject: [PATCH] silence resolved alerts (#4293) --- api/server/handlers/cluster/notify_resolved_incident.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/server/handlers/cluster/notify_resolved_incident.go b/api/server/handlers/cluster/notify_resolved_incident.go index e2e5f20aa8..3a7537f901 100644 --- a/api/server/handlers/cluster/notify_resolved_incident.go +++ b/api/server/handlers/cluster/notify_resolved_incident.go @@ -36,8 +36,13 @@ func NewNotifyResolvedIncidentHandler( } func (c *NotifyResolvedIncidentHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + project, _ := r.Context().Value(types.ProjectScope).(*models.Project) cluster, _ := r.Context().Value(types.ClusterScope).(*models.Cluster) + if project.GetFeatureFlag(models.ValidateApplyV2, c.Config().LaunchDarklyClient) { + return + } + request := &types.Incident{} if ok := c.DecodeAndValidate(w, r, request); !ok {