Multi-channel events with per-repository rules and severities #10
Labels
No labels
breaking
bug
ci
dependencies
documentation
feature
security
skip-changelog
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
argus/backend#10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Per-repository rules that raise events with a severity (
alert,warning,info) and deliver them over one or more channels. Every raised event is recorded and listed on a summary page, even when its rule has no channel enabled. New-report notifications are just one kind ofinfoevent (supersedes #11).Rules (
EventRule, perProject)enabled, severityalert/warning/info(defaulted from the trigger, editable)master,release/*, any PR)fail→ alert; becomeswarn→ warningEvents
Event(rule, severity, project, ref, type, triggering report/aggregate, message, date) + oneEventDeliveryper channel (sent/failed/skipped+ error) + per-user read state for the web channelrecompute_aggregate(all variants combined), "new report" at the end ofprocess_report; one Celery task per channel with retriesChannels
GET /api/events/?unread=1), mark as read / mark all as read.pywebpush),PushSubscriptionper user/browser,POST /api/push/subscribe|unsubscribe, service worker in the SPA.EmailMultiAlternatives(HTML + text) through poulpinou (INSTALLED_APPS, migration, beat task, bump to 1.1.0).MATTERMOST_URL,MATTERMOST_BOT_TOKENvia_secret).GET /api/mattermost/channels/to pick the channel, posts viaPOST /api/v4/posts, attachment coloured by severity.ref_kind = pr(otherwise deliveryskipped). ForgejoPOST/PATCHissue comments with the service token; one comment per PR and rule, updated in place via a hidden marker<!-- argus-event:{rule_id} -->. Requireswrite:issuescope onFORGEJO_API_TOKEN.Richer upload metadata (argus/upload-action)
ReportUploadSerializer+Report; used in event messages.API
CRUD /api/projects/<owner>/<repo>/event-rules/(write), follow/unfollow (read), "test rule" action (sends without recording)GET /api/projects/<owner>/<repo>/events/andGET /api/events/(read; filters: project, rule, severity, trigger, delivery state, period, unread; paginated)Frontend (argus/frontend)
/eventsand/:owner/:repo/events, filterable by severity, with per-channel delivery stateTests
pytest (each trigger, default severities, de-duplication, grouping, each channel mocked, permissions,
coversmarkers +features.catalog.yaml), vitest + msw (settings tab, summary page, bell), upload-action tests for the new fields, one e2e scenario (rule → failing report → event listed and in the bell).Delivered as PRs on argus/backend, argus/frontend and argus/upload-action.
Multi-channel alerts with per-repository rulesto Multi-channel events with per-repository rules and severities