Skip to content

Fix #1128 review defects before v3.0.0 tag#1131

Merged
erikdarlingdata merged 1 commit into
devfrom
fix/pretag-review
Jun 16, 2026
Merged

Fix #1128 review defects before v3.0.0 tag#1131
erikdarlingdata merged 1 commit into
devfrom
fix/pretag-review

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Pre-tag code review (3 subagents) of this release's alert-badge and XML-processor work surfaced six fix-before-release defects. All fixed and verified in this PR.

Lite server-tab badge parity (#1128)

  • Stale badge never cleared. The low-disk / failed-job badge flags were only written inside the feature-enabled / online / msdb branches, so a disabled feature or an offline server left a previously-lit badge stuck on. Now computed as locals through the sweep and written once at the end — the off/offline path clears it.
  • Dismissed badge could never re-show. The low-disk and failed-job conditions are plain booleans with no event timestamp, so UpdateAlertCounts' timestamp-based ack-clear never fired for them — once dismissed, a fresh breach / new failed job stayed dark. Added AlertStateService.ClearAcknowledgementForNewCondition, called on a false->true transition, matching the Dashboard's re-show on a new disk/job condition.
  • Dict leak / stale flash on reopen. Per-server badge state wasn't dropped on tab close. Now removed in CloseServerTab.
  • Tests. New AlertBadgeAckTests (4 tests) cover ack → suppress → new-condition re-show, the no-op-when-nothing-acked path, and silenced-server precedence.

install/25_process_deadlock_xml.sql

  • Perpetual NO_RESULTS. The proc logged NO_RESULTS + "left unprocessed for retry" after it had already marked the rows processed — a permanent false-failure signal. A clean parse run with 0 reconstructable graphs is SUCCESS (events processed, simply no deadlock graph). Genuine failures still take the CATCH path → ERROR. Mirrors process_blocked_process_xml.
  • Window pad. Moved the +1s pad from @end_date onto the parser's local upper bound only; the mark uses the un-padded UTC @end_date, so a deadlock inserted in that extra second is left for the next run rather than marked unparsed.

install/53_collect_server_properties.sql

  • Azure tier/SLO change missed. SERVERPROPERTY('Edition') is the constant 'SQL Azure' on Azure SQL DB, so a pure tier/SLO change with no vCore/memory delta never changed the row_hash and the collector skipped it. Added DATABASEPROPERTYEX(DB_NAME(), 'Edition'/'ServiceObjective') to the hash.

Verification

  • Lite build OK; Lite.Tests 447 (443 + 4 new), Dashboard.Tests 487 — all green.
  • Installer applies 55/55 scripts on SQL2017, 46 collectors ran (validates modified 25 + 53 in the real install path).
  • Diff is surgical (86/28 across the 4 modified files), no line-ending churn.

🤖 Generated with Claude Code

Pre-tag code review (3 agents) surfaced six fix-before-release defects in the
alert-badge and XML-processor changes made this release. All fixed and verified.

Lite server-tab badge parity (#1128):
- Write the low-disk/failed-job badge flags ONCE per sweep from locals, not only
  inside the feature-enabled/online/msdb branches — a disabled feature or an
  offline server now CLEARS a stale badge instead of leaving it lit.
- A false->true badge transition is a genuinely new condition, so it clears any
  acknowledgement (new AlertStateService.ClearAcknowledgementForNewCondition).
  The boolean low-disk/failed-job conditions carry no event timestamp, so
  UpdateAlertCounts could never re-show them after a dismiss — matching the
  Dashboard's re-show on a new disk/job condition.
- Drop per-server badge state on tab close (dict leak + stale flash on reopen).
- Cover the ack / re-show logic with AlertBadgeAckTests (4 tests).

install/25_process_deadlock_xml.sql:
- Log SUCCESS on any clean parse run (0 reconstructable graphs is success, not
  failure); ends the perpetual NO_RESULTS this proc logged AFTER it had already
  marked the rows processed. Mirrors process_blocked_process_xml.
- Move the +1s window pad to the parser's LOCAL upper bound only; the mark uses
  the un-padded UTC @end_date so a deadlock inserted in that extra second is left
  for the next run, not marked unparsed.

install/53_collect_server_properties.sql:
- Include DATABASEPROPERTYEX Edition/ServiceObjective in the row_hash so an Azure
  SQL DB tier/SLO change with no vCore/memory delta is detected (SERVERPROPERTY
  Edition is the constant 'SQL Azure', so it alone never changed the hash).

Verified: Lite build OK; Lite.Tests 447, Dashboard.Tests 487 pass; installer
applies 55/55 on SQL2017 with 46 collectors running.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 6f534f5 into dev Jun 16, 2026
6 checks passed
@erikdarlingdata erikdarlingdata deleted the fix/pretag-review branch June 16, 2026 22:57
This was referenced Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant