Skip to content

cleanup: remove business fields from UpdateOptions, _customOptions, ClientCoreTest, Linux Script#393

Merged
JusterZhu merged 4 commits into
masterfrom
cleanup/remove-customoptions-bizfields
May 25, 2026
Merged

cleanup: remove business fields from UpdateOptions, _customOptions, ClientCoreTest, Linux Script#393
JusterZhu merged 4 commits into
masterfrom
cleanup/remove-customoptions-bizfields

Conversation

@JusterZhu
Copy link
Copy Markdown
Collaborator

Summary

5-in-1 cleanup per juster's requirements:

1. UpdateOptions.cs — Business fields removed

Removed 14 business fields that already exist in \Configinfo/\BaseConfigInfo:
\UpdateUrl, \AppSecretKey, \AppName, \MainAppName, \InstallPath, \ClientVersion, \UpgradeClientVersion, \Platform, \ReportUrl, \ProductId, \PermissionScript, \Scheme, \Token, \Bowl, \UpdateLogUrl, \Script\

Kept 20 framework-level options: \AppType, \DiffMode, \Encoding, \Format, \DownloadTimeout, \DriveEnabled, \PatchEnabled, \BackupEnabled, \Mode, \Silent, \SilentAutoInstall, \SilentPollIntervalMinutes, \MaxConcurrency, \EnableResume, \RetryCount, \VerifyChecksum, \RetryInterval, \OSSProvider, \OSSBucketRegion, \BlackList, \Hub\

2. _customOptions mechanism removed

  • \GeneralUpdateBootstrap.AddCustomOption()\ removed
  • \ClientUpdateStrategy.UseCustomOption()\ / \ExecuteCustomOptions()\ removed
  • Hook mechanism (\IUpdateHooks) already covers pre/post-update logic

3. ClientCoreTest project deleted

  • Entire \ ests/ClientCoreTest/\ directory removed

4. LinuxStrategy Script mechanism removed

  • \ExecuteScript()\ method and its call from \StartApp()\ removed
  • \IUpdateHooks.OnBeforeStartAppAsync\ covers permission-setting

5. GeneralUpdate.Core cleanup

  • Removed unused using directives
  • Added XML doc comments to enums (\DiffMode, \Format, \UpdateMode, \ReportType)

Results

Project Pass Fail
CoreTest 165 3 (pre-existing)
DifferentialTest 85 0

Copilot AI review requested due to automatic review settings May 24, 2026 16:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs a multi-area cleanup across GeneralUpdate.Core by removing business-specific configuration from UpdateOptions, removing the legacy “custom options” pre-check mechanism, deleting the ClientCoreTest test project, and removing LinuxStrategy’s built-in script execution in favor of the existing hooks system.

Changes:

  • Removed business fields from UpdateOptions to keep it framework-level only, and updated bootstrap usage accordingly.
  • Removed _customOptions / AddCustomOption / UseCustomOption support from bootstrap and strategy workflow.
  • Removed LinuxStrategy startup script execution and deleted the tests/ClientCoreTest project; added/expanded XML docs on several configuration types.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/ClientCoreTest/README.md Removes documentation for the deleted ClientCoreTest project.
tests/ClientCoreTest/Hubs/UpgradeHubServiceTests.cs Deletes hub service tests along with the removed test project.
tests/ClientCoreTest/Hubs/RandomRetryPolicyTests.cs Deletes retry policy tests along with the removed test project.
tests/ClientCoreTest/ClientCoreTest.csproj Deletes the ClientCoreTest project definition.
tests/ClientCoreTest/Bootstrap/ClientBootstrapScenarioTests.cs Deletes scenario tests that depended on custom options and script behavior.
src/c#/GeneralUpdate.Core/Strategy/WindowsStrategy.cs Removes duplicate/unused using directives.
src/c#/GeneralUpdate.Core/Strategy/LinuxStrategy.cs Removes ExecuteScript() and adjusts startup logging to launch the main app directly.
src/c#/GeneralUpdate.Core/Strategy/ClientUpdateStrategy.cs Removes custom option registration/execution from the client workflow.
src/c#/GeneralUpdate.Core/Strategy/AbstractStrategy.cs Removes duplicate using directive.
src/c#/GeneralUpdate.Core/Configuration/UpdateOptions.cs Removes business options; documents and retains framework-level options.
src/c#/GeneralUpdate.Core/Configuration/UpdateMode.cs Adds XML docs to the enum.
src/c#/GeneralUpdate.Core/Configuration/ReportType.cs Adds XML docs to report status constants.
src/c#/GeneralUpdate.Core/Configuration/Format.cs Adds XML docs to compression format constants.
src/c#/GeneralUpdate.Core/Configuration/DiffMode.cs Expands enum and adds XML docs.
src/c#/GeneralUpdate.Core/Bootstrap/GeneralUpdateBootstrap.cs Removes custom options wiring and updates hub auth values to come from config info.
Comments suppressed due to low confidence (1)

tests/ClientCoreTest/ClientCoreTest.csproj:1

  • This project is removed, but the repo still references it in src/c#/GeneralUpdate.slnx and in .github/workflows/ci.yml (Ubuntu test step runs dotnet test tests/ClientCoreTest/ClientCoreTest.csproj). Those references need to be removed/updated or CI and solution builds will fail due to the missing csproj.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +29 to 30
/// <summary>Download timeout in seconds.</summary>
public static UpdateOption<int?> DownloadTimeout { get; } = UpdateOption.ValueOf<int?>("DOWNLOADTIMEOUT", 30);
Comment on lines +5 to +10
/// </summary>
public enum UpdateMode
{
/// <summary>Standard file-based update.</summary>
Default = 0,
/// <summary>Script-based custom update logic.</summary>
JusterZhu added 3 commits May 25, 2026 00:19
…lientCoreTest, Linux Script

1. UpdateOptions.cs: remove 14 business fields (UpdateUrl, Token, Scheme, etc)
   - keep only 20 framework-level options (AppType, Silent, DiffMode, etc.)
   - business fields already exist in Configinfo/BaseConfigInfo

2. Remove _customOptions mechanism from GeneralUpdateBootstrap + ClientUpdateStrategy
   - hooks (IUpdateHooks) already cover pre/post-update logic
   - Hub config now uses _configInfo.Token/AppSecretKey

3. Delete tests/ClientCoreTest/ (no longer needed)

4. LinuxStrategy: remove Script mechanism
   - IUpdateHooks.OnBeforeStartAppAsync covers permission-setting

5. GeneralUpdate.Core cleanup: unused usings, XML docs on enums
- BootstrapFullParameterMatrixTests: remove all tests/options for
  deleted business fields (Deployment/Security/Reporting regions),
  remove AddCustomOption calls, keep only framework-level options
- BootstrapHooksAndExtensionsTests: remove AddCustomOption and
  deleted UpdateOptions references, consolidate test code
@JusterZhu JusterZhu force-pushed the cleanup/remove-customoptions-bizfields branch from 5e80d67 to f10b247 Compare May 24, 2026 16:22
@JusterZhu JusterZhu merged commit ab98159 into master May 25, 2026
3 checks passed
@JusterZhu JusterZhu deleted the cleanup/remove-customoptions-bizfields branch May 25, 2026 02:23
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.

2 participants