Check incident_management_settings before sending alert email
What does this MR do?
The current behavior is: An email is always sent to developers when an alert is received from alertmanager.
The new behavior:
An email should be sent only if the appropriate checkbox is not unticked in the Operations Settings. Note that the settings are stored in the ProjectIncidentManagementSettings model. This means that the email should be sent if any of the following is true:
- The project has the
incident_management
feature_flag and license enabled but does not have an entry in the ProjectIncidentManagementSettings model. This is to keep the default behavior of sending emails to developers. - The project has the
incident_management
feature_flag and license enabled andProjectIncidentManagementSettings.send_email
is set to true. - The project has the
incident_management
feature_flag or license disabled. This is also to keep the current behavior of sending emails to developers.
Note that if the incident_management
license is disabled, but the incident_management
feature flag is enabled, the alert email will not be sent out.
This MR changes the NotifyService
to respect the ProjectIncidentManagementSettings.send_email
setting.
The new settings form that is being added to the Operations Settings page:
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
EE specific content should be in the top level /ee
folder -
For a paid feature, have we considered GitLab.com plans, how it works for groups, and is there a design for promoting it to users who aren't on the correct plan? -
Security reports checked/validated by reviewer
Merge request reports
Activity
changed milestone to %11.9
added Deliverable GitLab Ultimate UX backend breadth devopsmonitor direction feature flag frontend release post item ~2975006 + 1 deleted label
1 Warning CHANGELOG missing. You can create one with:
bin/changelog -m 9830 "Check incident_management_settings before sending alert email"
If your merge request doesn’t warrant a CHANGELOG entry,
consider adding any of the ~backstage, ci-build, ~Documentation, meta, QA, test labels.
See the documentation.Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category (e.g. frontend or backend), and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has randomly picked a candidate for each review slot. Feel free to override this selection if you think someone else would be better-suited, or the chosen person is unavailable.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not (yet?) automatically notify them for you.
Category Reviewer Maintainer backend Ash McKenzie ( @ashmckenzie
)Lin Jen-Shin ( @godfat
)Generated by
DangerEdited by 🤖 GitLab Bot 🤖added 1 commit
- 898b180a - Stub license manually since helper is not helping
added 168 commits
-
898b180a...4ac0cc00 - 166 commits from branch
master
- e10c1415 - Check setting before sending alert email
- 80acefc1 - Stub license manually since helper is not helping
-
898b180a...4ac0cc00 - 166 commits from branch
Hi @splattael, can you please review this?
assigned to @splattael
added 1 commit
- 44288170 - Stub license manually since helper is not helping
- Resolved by Peter Leitzen
- Resolved by Peter Leitzen
- Resolved by Peter Leitzen
- Resolved by Peter Leitzen
- Resolved by Reuben Pereira
- Resolved by Peter Leitzen
- Resolved by Reuben Pereira
- Resolved by Peter Leitzen
- Resolved by Sean McGivern
- Resolved by Peter Leitzen
- Resolved by Reuben Pereira