Add dismissed_archive_alerts sidecar table for parquet-aware dismissal (#718)#730
Merged
erikdarlingdata merged 14 commits intoerikdarlingdata:devfrom Mar 27, 2026
Conversation
- Parse detail_text to extract Database, Query Text, and Wait Type when using 'Mute This Alert' from alert history (both editions) - Add PopulateFromDetailText() to AlertMuteContext for structured field extraction from the label: value format - Add 'Default expiration for new mute rules' dropdown to Settings in both editions (1 hour, 24 hours, 7 days, Never; default 24h) - MuteRuleDialog now selects the configured default expiration instead of always defaulting to 'Never' - Persist setting as mute_rule_default_expiration in settings.json (Lite) and preferences.json (Dashboard) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The XML doc claimed Job Name extraction but the parser did not implement it. Add the missing branch in both Dashboard and Lite editions so the behavior matches the documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Collapse newlines in Truncate/TruncateText so detail_text fields stay single-line in the label: value format - Handle multi-line query values in PopulateFromDetailText by accumulating continuation lines until the next indented field - Recognize variant query labels (Blocked Query, Blocking Query, Victim SQL) in addition to Query Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Explain that the field is a case-insensitive substring match and suggest entering a distinctive fragment like a table or procedure name. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Feature/alert muting part 2
erikdarlingdata#718) The dismiss flow targets the live config_alert_log table, but alerts archived to parquet are read-only. This adds a sidecar table that tracks dismissed archived alerts so the view can filter them out. Schema: - New dismissed_archive_alerts table (alert_time, server_id, metric_name, dismissed_at) with composite index - Schema version bumped to 23 with migration View: - v_config_alert_log parquet half now excludes rows present in the sidecar table via NOT EXISTS Dismiss logic: - DismissAlertsAsync: when UPDATE returns 0 rows (archived alert), falls back to sidecar INSERT with duplicate prevention - DismissAllVisibleAlertsAsync: after live UPDATE, inserts remaining undismissed archived alerts into the sidecar table Tests: - 7 new xUnit tests covering sidecar creation, view filtering, duplicate prevention, mixed live+archive dismiss, and schema version - Updated DuckDbSchemaTests table count from 28 to 29 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Once 729 is merged in, I'll resolve the conflicts and update the PR. |
Owner
|
@HannahVernon #729 was mergered already |
Contributor
Author
|
@erikdarlingdata - rebased cleanly ready for merge whenever you are 🚀 |
Merged
11 tasks
This was referenced Mar 27, 2026
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.
What does this PR do?
Addresses issue #718 where alert dismissal silently fails for archived alerts. The dismiss flow targets the live
config_alert_logtable, but alerts archived to parquet files are read-onlyUPDATEreturns 0 affected rows with no user feedback.This PR adds a sidecar table (
dismissed_archive_alerts) that tracks which archived alerts have been dismissed, and modifies thev_config_alert_logview to filter them out.Changes
Lite/Database/Schema.csdismissed_archive_alertstable (alert_time, server_id, metric_name, dismissed_at) with composite indexLite/Database/DuckDbInitializer.csv_config_alert_logparquet half now excludes rows present in sidecar viaNOT EXISTSLite/Services/LocalDataService.AlertHistory.csDismissAlertsAsync: when UPDATE returns 0 rows, falls back to sidecar INSERT with duplicate prevention.DismissAllVisibleAlertsAsync: after live UPDATE, inserts remaining undismissed archived alerts into sidecarLite.Tests/DuckDbSchemaTests.csLite.Tests/Helpers/TestAlertDataHelper.csLite.Tests/DismissedArchiveSidecarTests.csHow it works
Before: Archived alerts appear in the grid (via the view's parquet union) but
UPDATE config_alert_logcan never reach them. Clicking Dismiss silently does nothing.After: When
DismissAlertsAsyncdetects a 0-rows-affected UPDATE, it INSERTs the alert's key intodismissed_archive_alerts. The view's parquet half usesNOT EXISTSagainst this sidecar table to filter them out. The archived alert disappears from the grid on the next refresh.Design decisions
WHERE NOT EXISTSto prevent duplicate sidecar entries.Which component(s) does this affect?
How was this tested?
SchemaStatements_MatchTableCount)SidecarTable_ExistsAfterInittable created by migrationSidecarTable_HasCorrectColumnsschema validationSidecarInsert_HidesArchivedAlertFromViewcore feature: sidecar hides archived alertSidecarInsert_DoesNotAffectLiveAlertslive alerts unaffected by sidecarSidecarInsert_PreventsDuplicatesNOT EXISTS prevents double-insertDismissAll_HandlesLiveAndArchivedAlertsmixed live+archive dismiss flowSchemaVersion_IsUpdatedTo23migration applied correctlyChecklist
dotnet build -c Debug)