Skip to content

Fix GUI installer encryption mapping and history logging#612

Merged
erikdarlingdata merged 1 commit intodevfrom
fix/installer-gui-review-findings
Mar 17, 2026
Merged

Fix GUI installer encryption mapping and history logging#612
erikdarlingdata merged 1 commit intodevfrom
fix/installer-gui-review-findings

Conversation

@erikdarlingdata
Copy link
Owner

@erikdarlingdata erikdarlingdata commented Mar 17, 2026

Summary

  • Encryption "Optional" actually works now: The switch statement was missing the "Optional" case — it fell through to the default which mapped to Mandatory. Every install using "Optional" encryption was silently using Mandatory.
  • History logging no longer silently swallowed: Removed the bare catch inside LogInstallationHistoryAsync. Exceptions now propagate to the caller at MainWindow.xaml.cs:472 which already has proper error handling (LogMessage(..., "Warning")). Previously, a failed history write was invisible, causing the next installer run to fall back to version "1.0.0" and re-run all upgrade scripts.

Test plan

  • Install with encryption set to "Optional" — verify connection uses optional encryption
  • Run installer twice — verify second run detects the correct installed version (not "1.0.0")

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added support for optional SQL Server encryption setting during installation configuration.
    • Enhanced installation history tracking to automatically detect and log upgrade vs. reinstall scenarios, including previous version information.
  • Bug Fixes

    • Improved error resilience for installation history logging to prevent disruptions during initial installations.

- Add missing "Optional" case to encryption switch — previously fell
  through to default (Mandatory), making the dropdown option non-functional
- Remove bare catch in LogInstallationHistoryAsync — exceptions now
  propagate to the caller which already logs them as warnings. Prevents
  silent history write failures that cause version detection fallback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 11a91aa0-9009-4edf-aa43-2cc25d913de4

📥 Commits

Reviewing files that changed from the base of the PR and between 5c679e8 and edd6063.

📒 Files selected for processing (1)
  • InstallerGui/Services/InstallationService.cs

📝 Walkthrough

Walkthrough

Modified the installation service to support optional SQL encryption and refactored installation history logging to detect upgrade/reinstall scenarios by querying prior installation records and tracking additional diagnostic metadata including installer version, SQL Server details, installation type, and execution statistics.

Changes

Cohort / File(s) Summary
Installation Service Updates
InstallerGui/Services/InstallationService.cs
Added "Optional" encryption option to connection string builder. Significantly refactored LogInstallationHistoryAsync to establish database connection earlier, query installation history to determine installation type (INSTALL/REINSTALL/UPGRADE), track previous version, and insert comprehensive telemetry including installer/SQL Server versions, installation type, previous version, status, and duration metrics.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/installer-gui-review-findings
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@erikdarlingdata erikdarlingdata merged commit 91ed3e3 into dev Mar 17, 2026
3 of 4 checks passed
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