feat(lab6): add observability and SLO burn-rate alerts

This commit is contained in:
2026-11-15 06:54:54 +03:00
parent 470d9d6f1e
commit 63c1f06b84
204 changed files with 25348 additions and 37 deletions
@@ -0,0 +1,24 @@
BEGIN;
DROP TABLE IF EXISTS attachment_jobs;
DROP TABLE IF EXISTS attachment_variants;
ALTER TABLE attachments
DROP CONSTRAINT attachments_status_supported,
DROP CONSTRAINT attachments_status_error_consistency,
DROP CONSTRAINT attachments_staging_key_not_blank,
DROP CONSTRAINT attachments_staging_key_unique,
DROP CONSTRAINT attachments_pipeline_version_positive,
DROP COLUMN pipeline_version,
DROP COLUMN staging_key;
UPDATE attachments SET status = 'pending' WHERE status IN ('queued', 'processing');
ALTER TABLE attachments
ADD CONSTRAINT attachments_status_supported CHECK (status IN ('pending', 'ready', 'failed')),
ADD CONSTRAINT attachments_status_error_consistency CHECK (
(status = 'failed' AND error_code IS NOT NULL AND btrim(error_code) <> '')
OR (status IN ('pending', 'ready') AND error_code IS NULL)
);
COMMIT;