Skip to content
This repository was archived by the owner on Oct 1, 2026. It is now read-only.

Feature: notifications - #186

Draft
bakhterets wants to merge 7 commits into
mainfrom
notifications-clean
Draft

bakhterets wants to merge 7 commits into
mainfrom
notifications-clean

Conversation

@bakhterets

Copy link
Copy Markdown
Contributor

No description provided.

…l outbox

Enqueue notification rows in the same transaction as the maintenance change and
deliver them from a background worker with leases, retries and backoff.

- outbox table (migration 000008) with dedup, dispatch and retention indexes
- SMTP sender, renderer and recipient resolver per the review/lifecycle rules
- API and checker triggers publishing inside the business transaction
- admin ops endpoints (stats, failed, redrive) and Prometheus /metrics
- config validation for SMTP transport and review audience addresses
@bakhterets bakhterets self-assigned this Sep 2, 2026
@bakhterets
bakhterets requested a review from sgmv September 3, 2026 15:37
…ry improvements

- Updated notification documentation to reflect changes in configuration and delivery throughput.
- Removed the implementation plan for maintenance email notifications as it is no longer needed.
- Introduced a metrics server to monitor notification delivery performance, including queue depth and error rates.
- Added configuration options for metrics port and ensured validation to prevent conflicts with the main API port.
- Implemented a new failure handling mechanism for permanent delivery failures, allowing immediate marking of notifications without retries.
- Enhanced the worker to handle delivery failures more efficiently, including jitter in backoff strategy to spread retries.
- Added tests to verify the behavior of the worker under permanent failure conditions and ensure metrics are collected correctly.
…idation

- Introduced `SD_NOTIFICATIONS_ALLOWED_DOMAINS` to restrict accepted domains for `contact_email`, with exact matching and error reporting for invalid domains.
- Added `SD_NOTIFICATIONS_EXCLUDED_EMAILS` to prevent specific addresses from receiving notifications, applied to all recipients.
- Updated the handling of `contact_email` to be optional, defaulting to the creator's email from the token if omitted.
- Improved error handling with `NewErrMaintenanceContactEmailDomain` for clearer feedback on domain restrictions.
- Enhanced validation logic to ensure all configured emails and domains are valid at startup.
- Updated notification rendering to reflect the new state and headline logic based on the incident status.
- Added tests for domain allowance and exclusion logic in the notification publisher.
- Documented configuration changes and deployment instructions for the `stackmon-config` repository.

This branch has not been deployed

No deployments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant