Add source column to distinguish live vs archived alerts (#718)#729
Merged
erikdarlingdata merged 12 commits intoerikdarlingdata:devfrom Mar 27, 2026
Merged
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
…data#718) The alert history view (v_config_alert_log) unions live DuckDB rows with archived parquet files, but UPDATE only targets the live table. Users see archived alerts in the grid and clicking Dismiss silently does nothing. This change adds a computed 'source' column ('live' or 'archive') to the view so the UI can distinguish between dismissable and non-dismissable alerts: - DuckDbInitializer: v_config_alert_log view now includes source column - AlertHistoryRow: new Source and IsArchived properties - AlertsHistoryTab: archived rows greyed out with tooltip; dismiss handlers filter out archived alerts with clear MessageBox feedback - Test helper and 7 xUnit tests covering live, archive, mixed scenarios Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
11 tasks
11 tasks
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?
Issue #718 reports that alert dismissal stops working after ~20-30 alerts accumulate. One potential cause is a read/write mismatch:
GetAlertHistoryAsyncreads fromv_config_alert_loga view that unions the liveconfig_alert_logtable with archived parquet files butDismissAlertsAsyncissuesUPDATE config_alert_log, which only targets the live table. Archived alerts appear in the grid but can never be dismissed because they only exist in read-only parquet files.This PR adds a computed
sourcecolumn ('live'or'archive') to thev_config_alert_logview so the UI can distinguish dismissable alerts from non-dismissable ones. No schema migration orALTER TABLEis needed the column is purely virtual in the view definition.Changes
Lite/Database/DuckDbInitializer.csv_config_alert_logview now includes'live' AS source/'archive' AS sourcein all code paths (parquet present, no parquet, fallback)Lite/Services/LocalDataService.AlertHistory.cssource; mapped toAlertHistoryRow.Source(defaults to'live'if NULL); newIsArchivedcomputed propertyLite/Controls/AlertsHistoryTab.xamlDataTriggergreys out archived rows with a tooltip: This alert has been archived and cannot be dismissed.Lite/Controls/AlertsHistoryTab.xaml.csLite.Tests/Helpers/TestAlertDataHelper.csLite.Tests/AlertHistorySourceTests.csBefore: All rows from the view look the same. Clicking Dismiss on an archived alert runs an UPDATE that silently affects 0 rows.
After: Archived rows are visually greyed out and cannot be selected for dismissal. If the user selects a mix of live and archived alerts, a dialog explains which ones can be dismissed.
Which component(s) does this affect?
How was this tested?
LiveAlerts_HaveSourceLivelive table rows get source='live'ArchivedAlerts_HaveSourceArchiveparquet rows get source='archive'MixedAlerts_CorrectSourcePerRowmixed live+archive correctly labeledDismissUpdate_OnlyAffectsLiveTableUPDATE hits live (1 row), misses archive (0 rows)ViewWithNoParquet_AllRowsAreLiveno parquet files = all rows are liveAlertHistoryRow_IsArchived_ReflectsSourcemodel property unit testMultipleParquetFiles_AllMarkedAsArchivemultiple parquet files all marked archiveTestAlertDataHelperthat creates temp DuckDB databases with live inserts and parquet archive filesChecklist
dotnet build -c Debug)