Skip to content

refactor: Unify OSS update path through OSSUpdateStrategy #409

@JusterZhu

Description

@JusterZhu

Summary

GeneralUpdateBootstrap.LaunchAsync() bypasses the implemented OSSUpdateStrategy for the client-side OSS flow, calling LaunchOssAsync() directly. This creates two separate OSS code paths.

Current State

  • LaunchAsync() switch case: AppType.OSS => await LaunchOssAsync()
  • LaunchOssAsync() has its own version-check, download, and process-launch logic
  • OSSUpdateStrategy is fully implemented with hooks, reporter, and download orchestrator support but only triggered via the IPC path (when GlobalConfigInfoOSS env variable is set)

Expected

  1. LaunchAsync() for OSS should go through LaunchWithStrategy(new OSSUpdateStrategy()) just like Client and Upgrade
  2. All OSS logic (version check, download, decompress, launch) lives in OSSUpdateStrategy
  3. Delete LaunchOssAsync() from GeneralUpdateBootstrap
  4. OSS path benefits from hooks, reporter, and download orchestrator like Client/Upgrade paths do

Benefits

  • Single code path for OSS updates
  • Consistent hooks + reporter invocation across all AppType values
  • Less maintenance burden

Ref

Refactoring plan v2: Section 2.3 (Target Architecture), Sub Issue 3 (Bootstrap Unification)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions