Skip to content

Fix installer upgrade bugs and add Agent job cleanup#298

Merged
erikdarlingdata merged 1 commit intodevfrom
feature/installer-fixes-and-agent-cleanup
Feb 25, 2026
Merged

Fix installer upgrade bugs and add Agent job cleanup#298
erikdarlingdata merged 1 commit intodevfrom
feature/installer-fixes-and-agent-cleanup

Conversation

@erikdarlingdata
Copy link
Owner

Summary

  • Fix TRUNCATE TABLE using three-part name [PerformanceMonitor].[config].[collection_schedule] to avoid master context error when --reset-schedule is used (both CLI and GUI installers)
  • Fix Version comparison bug: normalize to 3-part versions to avoid Revision=-1 vs Revision=0 mismatch that silently skipped upgrade scripts (both installers)
  • Fix GUI installer upgrade detection: use AppAssemblyVersion (clean 2.0.0.0) instead of AppVersion (includes +commithash suffix that breaks Version.TryParse)
  • Add SQL Agent job cleanup (all 3 jobs) to Dashboard's DropMonitorDatabaseAsync so removing a server doesn't leave orphaned erroring jobs
  • Update RemoveServerDialog text to mention Agent job removal

Test plan

  • Fresh install on sql2016 (v1.3.0) — 51/51 scripts, 46 collectors
  • Upgrade v1.3.0 → v2.0.0 on sql2016 — upgrade found, 2/2 upgrade scripts + 51/51 install scripts
  • Idempotent re-run on sql2016 (already v2.0.0) — no upgrades, 51/51 scripts, 46 collectors
  • GUI upgrade on sql2025 — both upgrade paths found and applied
  • Agent job cleanup verified — all 3 jobs removed on DB drop
  • Dashboard and Lite build successfully

🤖 Generated with Claude Code

- Fix TRUNCATE TABLE using three-part name to avoid master context error
  when --reset-schedule is used (both CLI and GUI installers)
- Fix Version comparison bug: normalize to 3-part versions to avoid
  Revision=-1 vs Revision=0 mismatch breaking upgrade detection (both installers)
- Fix GUI installer upgrade detection: use AppAssemblyVersion instead of
  AppVersion (which includes +commithash suffix that breaks Version.TryParse)
- Add SQL Agent job cleanup (all 3 jobs) to Dashboard's DropMonitorDatabaseAsync
  so removing a server doesn't leave orphaned erroring jobs
- Update RemoveServerDialog text to mention Agent job removal

Tested: fresh install, v1.3.0→v2.0.0 upgrade, and idempotent re-run on sql2016

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit b8b0d63 into dev Feb 25, 2026
3 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/installer-fixes-and-agent-cleanup branch February 27, 2026 23:01
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