Skip to content

Add BaseDriverUpdater with retry, timeout, and rollback pipeline - #282

Merged
JusterZhu merged 1 commit into
masterfrom
feature/base-driver-updater-issue-281
May 23, 2026
Merged

Add BaseDriverUpdater with retry, timeout, and rollback pipeline#282
JusterZhu merged 1 commit into
masterfrom
feature/base-driver-updater-issue-281

Conversation

@JusterZhu

Copy link
Copy Markdown
Collaborator

Summary

Add the core \BaseDriverUpdater\ abstract class that provides the unified driver update pipeline, along with \RetryPolicy\ and built-in pipeline steps.

Changes

  • BaseDriverUpdater: abstract base class implementing \IGeneralDrivelution\
    • Unified validate-backup-install-verify pipeline
    • Retry on transient failures (per-step, configurable)
    • Timeout enforcement via \CancellationTokenSource\ linked token
    • Automatic rollback on failure when backup is available
    • Event hooks: \OnStepStarted, \OnStepCompleted, \OnProgress, \OnUpdateCompleted\
    • Structured exception-to-ErrorInfo mapping with suggested resolutions
    • Subclasses only need to implement \InstallCoreAsync\
  • RetryPolicy: configurable retry with exponential backoff, factory methods, and \DrivelutionOptions\ integration
  • DefaultPipelineSteps: built-in \ValidateStep, \BackupStep, \InstallStep, \VerifyStep\ using delegate pattern
  • DrivelutionOptions: added \UseExponentialBackoff\ flag

Why

Eliminates ~60% code duplication between Windows and Linux implementations (coming in sub-tasks 3 and 4), and adds features that were defined but never implemented (retry, timeout, unified rollback, progress events).

Closes #281

…lback pipeline

- BaseDriverUpdater: abstract base class implementing IGeneralDrivelution with unified pipeline
- RetryPolicy: configurable retry with exponential backoff support
- DefaultPipelineSteps: built-in Validate, Backup, Install, Verify step implementations
- DrivelutionOptions: add UseExponentialBackoff configuration flag

The base class provides:
- Unified validate-backup-install-verify pipeline with retry on transient failures
- Timeout enforcement via linked CancellationTokenSource
- Automatic rollback on failure when backup exists
- Event hooks for step start/completion, progress, and update completion
- Structured exception-to-ErrorInfo mapping with suggested resolutions
- Subclasses only need to implement InstallCoreAsync

Closes #281
Copilot AI review requested due to automatic review settings May 23, 2026 10:18
@JusterZhu
JusterZhu merged commit b6ec830 into master May 23, 2026
1 check failed
@JusterZhu
JusterZhu deleted the feature/base-driver-updater-issue-281 branch May 23, 2026 10:19
@JusterZhu
JusterZhu removed the request for review from Copilot May 23, 2026 10:39
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.

Add BaseDriverUpdater with retry, timeout, and rollback pipeline

1 participant