Skip to content

chore: Clean up redundant code and align model signatures#417

Merged
JusterZhu merged 2 commits into
masterfrom
issue/411-cleanup
May 25, 2026
Merged

chore: Clean up redundant code and align model signatures#417
JusterZhu merged 2 commits into
masterfrom
issue/411-cleanup

Conversation

@JusterZhu
Copy link
Copy Markdown
Collaborator

Summary

  • Removed empty \GeneralUpdate.ClientCore\ directory (bin/obj artifacts only)
  • \DownloadResult.Url\ replaced with \DownloadResult.Asset\ (full \DownloadAsset)
  • \IDownloadExecutor.ExecuteAsync\ now accepts \DownloadAsset\ instead of \string url\

Closes #411

- Delete empty GeneralUpdate.ClientCore directory (bin/obj artifacts only)
- DownloadResult.Url replaced with DownloadResult.Asset (full DownloadAsset)
- IDownloadExecutor.ExecuteAsync now accepts DownloadAsset instead of string url

Closes #411
Copilot AI review requested due to automatic review settings May 25, 2026 11:59
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 continues the download refactor/cleanup from #411 by removing stale artifacts and aligning the download pipeline to pass richer DownloadAsset metadata through executor/orchestrator boundaries.

Changes:

  • Removed the leftover src/c#/GeneralUpdate.ClientCore/ directory (build artifacts only).
  • Updated IDownloadExecutor.ExecuteAsync to accept a DownloadAsset instead of a URL string, and updated executors/orchestrator call sites accordingly.
  • Updated DownloadResult to carry the full DownloadAsset instead of just a URL.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/c#/GeneralUpdate.Core/Download/Orchestrators/DefaultDownloadOrchestrator.cs Passes DownloadAsset into the executor and updates failure reporting to reference Asset.Url.
src/c#/GeneralUpdate.Core/Download/Models/DownloadProgress.cs Updates DownloadResult to include DownloadAsset instead of Url.
src/c#/GeneralUpdate.Core/Download/Executors/OssDownloadExecutor.cs Aligns executor signature to accept DownloadAsset and returns DownloadResult(asset, ...).
src/c#/GeneralUpdate.Core/Download/Executors/HttpDownloadExecutor.cs Aligns executor signature to accept DownloadAsset and returns DownloadResult(asset, ...).
src/c#/GeneralUpdate.Core/Download/Abstractions/IDownloadExecutor.cs Changes interface contract to accept DownloadAsset instead of URL.

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

Comment on lines 124 to +125
var failedDetails = results.Where(r => !r.Success)
.Select(r => ((object)r.Url, r.ErrorMessage ?? "failed")).ToList();
.Select(r => ((object)r.Asset.Url, r.ErrorMessage ?? "failed")).ToList();
Comment on lines 17 to 20
public record DownloadResult(
string? Url,
DownloadAsset Asset,
string? LocalPath,
long DownloadedBytes,
Comment on lines 79 to 83
catch (Exception ex) when (ex is not OperationCanceledException)
{
sw.Stop();
return new DownloadResult(url, null, existingBytes, sw.Elapsed, retries, false, ex.Message);
return new DownloadResult(asset, null, existingBytes, sw.Elapsed, retries, false, ex.Message);
}
Comment on lines 42 to 46
catch (Exception ex) when (ex is not OperationCanceledException)
{
sw.Stop();
return new DownloadResult(url, null, 0, sw.Elapsed, 0, false, ex.Message);
return new DownloadResult(asset, null, 0, sw.Elapsed, 0, false, ex.Message);
}
@JusterZhu JusterZhu merged commit 656468c into master May 25, 2026
3 checks passed
@JusterZhu JusterZhu deleted the issue/411-cleanup branch May 25, 2026 12:10
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.

chore: Clean up redundant code and align model signatures

2 participants