feat: disable backup feature by default#511
Merged
Merged
Conversation
Backup is now opt-in rather than opt-out. Users who need backup before applying updates must explicitly set BackupEnabled = true or set the BACKUP environment variable to true. This reduces unnecessary I/O and storage consumption for users who don't require rollback capability. Rollback via backup remains fully functional when enabled. Option.BackupEnabled default: true -> false BackupConfig.Enabled default: true -> false Co-Authored-By: Claude <noreply@anthropic.com>
Test assertions that expected BackupEnabled default to be true now expect false. Also renamed Options_BackupEnabled_DefaultIsTrue to Options_BackupEnabled_DefaultIsFalse for clarity. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR changes the default behavior of the GeneralUpdate.Core update workflow to make filesystem backup opt-in instead of opt-out, reducing unnecessary disk I/O and storage usage for users who don’t need rollback.
Changes:
- Set
Option.BackupEnableddefault fromtruetofalse(environment/option default). - Set
StorageManager.BackupConfig.Enableddefault fromtruetofalse(backup config default). - Update XML documentation in
UpdateContextto reflect the new default.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/c#/GeneralUpdate.Core/Configuration/Option.cs |
Changes the default option value for BACKUP to false, making backup opt-in via options/env. |
src/c#/GeneralUpdate.Core/FileSystem/StorageManager.cs |
Updates BackupConfig.Enabled default and doc comment to align with opt-in backup. |
src/c#/GeneralUpdate.Core/Configuration/UpdateContext.cs |
Updates XML docs to reflect the new default for BackupEnabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Closes #510
Changed the default value of
BackupEnabledfromtruetofalse. Backup is now opt-in rather than opt-out, reducing unnecessary I/O and storage consumption for users who don't require rollback capability.Changes
src/c#/GeneralUpdate.Core/Configuration/Option.csOption.BackupEnableddefault:true→falsesrc/c#/GeneralUpdate.Core/FileSystem/StorageManager.csBackupConfig.Enableddefault:true→falsesrc/c#/GeneralUpdate.Core/Configuration/UpdateContext.csMigration
Users who need backup can enable it via:
Code:
Environment variable:
BACKUP=trueRollback via backup remains fully functional when enabled.
🤖 Generated with Claude Code