feat(incidents): Add statuspage reminder for P0/P1 incidents#209
Draft
rgibert wants to merge 2 commits into
Draft
feat(incidents): Add statuspage reminder for P0/P1 incidents#209rgibert wants to merge 2 commits into
rgibert wants to merge 2 commits into
Conversation
Schedule a one-shot reminder 15 minutes after incident declaration (or severity escalation to P0/P1) that posts to the incident Slack channel if no Statuspage update has been created yet. The reminder notes the 20-minute SLO for initial Statuspage messages. The task checks conditions at execution time (severity, status, existing Statuspage link) so it gracefully no-ops if the situation has changed since scheduling. Co-Authored-By: Claude <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/o9ZBpkn9n875C7FLtNrsLJSce5IgxuPmg6NpIHTinQI
0fd23eb to
fceaf55
Compare
Add slash_command field to SlackConfig (defaults to "/inc") and use it in the statuspage reminder message instead of hardcoding "/ft". Co-Authored-By: Claude <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/JwMQDLS3v9X34uhTidGcdLl3C8chDYq3yp_YEr_z2UE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Schedules a one-shot Slack reminder 15 minutes after a P0/P1 incident is declared (or escalated to P0/P1). If no Statuspage update has been posted by then, the bot posts a reminder to the incident channel noting the 20-minute SLO for initial Statuspage messages.
Uses Django-Q's
Schedule.ONCEwithget_or_createon a per-incident name (statuspage_reminder_{id}) so duplicate scheduling is idempotent. The task re-checks conditions at execution time -- severity, status, and whether a STATUSPAGE ExternalLink exists -- so it gracefully no-ops if the situation changed since scheduling (e.g., statuspage already posted, incident resolved, severity downgraded).Hooks into both
on_incident_createdandon_severity_changed(escalation path only). No migration required since Schedule rows are created dynamically at runtime rather than as static infrastructure.Note: executed Schedule rows (
repeats=0) accumulate in the django_q Schedule table over time. This is harmless but may warrant periodic cleanup later.Partially resolves RELENG-587
Agent transcript: https://claudescope.sentry.dev/share/7R-HB5u__CjXYBp0OcGlGpES9oOjHcOMt6PSTK2QT7Y