mirror of
https://github.com/anand34577/ferrum.git
synced 2026-09-19 00:55:11 +00:00
d9b2519b75
- New PBS Backups page (/pbs): datastore usage, group browser, per-group prune, GC with live status, sync/verify jobs with admin-gated run - Shared single-connection SSE store (lib/sse.ts) feeding NotificationBell and the telemetry pill; global offline banner with reconnect invalidation - Correctness: CIFS storage credentials sent in JSON body; per-row alert silencing + unsilence endpoint; graceful stop-and-delete for running guests; accent/shadow token fixes for all look presets - Safer operations: confirms for SDN apply and host upgrade-all; Refresh control on every page; 30s polling added to previously-static pages - Wayfinding: guests deep-linkable via /inventory?focusGuest, scoped inventory views, topology guest click-through, Overview links - Forms/consistency: node storage/bridge pick-lists in CreateGuestDialog, backup schedule validation, BulkOperationsPage on shared DataTable, progressive pagination on cluster access lists, shared Timestamp and chartToneFor helpers, editable alert rules and webhooks - Security/tests: CSRF, authz-matrix, redaction and PBS test coverage; webhook outbox + connection TLS fingerprint migrations (00032/00033, sqlite + postgres) - Comment audit: removed stale, duplicated and orphaned comments; corrected inaccurate doc comments (UpdateGuestConfig, InvalidateAll, breakpoint references); no behavior changes
26 lines
1.3 KiB
SQL
26 lines
1.3 KiB
SQL
-- +goose Up
|
|
-- Durable delivery queue for outgoing webhooks (internal/notify). Each
|
|
-- matching (event, subscription) pair is written here BEFORE the first
|
|
-- delivery attempt, so a crash mid-delivery or a temporarily unreachable
|
|
-- receiver no longer loses the event — the dispatcher deletes a row once
|
|
-- the receiver accepts it, and a periodic sweep re-attempts rows whose
|
|
-- next_attempt_at has come due (previously delivery was at-most-once,
|
|
-- backed only by the event bus's in-memory channel). The composite primary
|
|
-- key makes re-publishing the same event idempotent per subscription.
|
|
-- Rows older than 24h are abandoned by the sweep (unreachable receiver);
|
|
-- the webhook_deliveries log preserves the attempt history.
|
|
CREATE TABLE webhook_outbox (
|
|
event_id TEXT NOT NULL,
|
|
subscription_id TEXT NOT NULL REFERENCES webhook_subscriptions(id) ON DELETE CASCADE,
|
|
event_type TEXT NOT NULL,
|
|
payload TEXT NOT NULL,
|
|
attempts INTEGER NOT NULL DEFAULT 0,
|
|
next_attempt_at TEXT, -- NULL = due now; otherwise the sweep's earliest retry time
|
|
created_at TEXT NOT NULL,
|
|
PRIMARY KEY (event_id, subscription_id)
|
|
);
|
|
CREATE INDEX idx_webhook_outbox_subscription_due ON webhook_outbox(subscription_id, next_attempt_at);
|
|
|
|
-- +goose Down
|
|
DROP TABLE webhook_outbox;
|