-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(aqua): add start_operations for progress reporting #7354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
0a6996f
a3e7064
c5e88f0
83389ce
02d45c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -290,6 +290,17 @@ impl Backend for AquaBackend { | |
| (url, v.to_string(), filename, digest) | ||
| }; | ||
|
|
||
| // Determine operation count for progress reporting | ||
| let mut op_count = 1; // download | ||
| if pkg.checksum.as_ref().is_some_and(|c| c.enabled()) || api_digest.is_some() { | ||
| op_count += 1; | ||
| } | ||
| let format = pkg.format(&v, os(), arch()).unwrap_or_default(); | ||
|
||
| if !format.is_empty() && format != "raw" { | ||
|
||
| op_count += 1; | ||
| } | ||
|
cursor[bot] marked this conversation as resolved.
Outdated
|
||
| ctx.pr.start_operations(op_count); | ||
|
|
||
| self.download(ctx, &tv, &url, &filename).await?; | ||
|
|
||
| if existing_platform.is_none() { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Operation count misses checksum from GitHub API digest
The operation count calculation only checks
pkg.checksum.enabled()to determine if checksum verification will occur. However, checksum verification also happens whenapi_digestis set from the GitHub API (at lines 310-312), which setsplatform_info.checksumindependently of the package's checksum configuration. Whenapi_digestis present butpkg.checksum.enabled()is false, theop_countwill undercount operations, causing the progress bar to overshoot 100% whenverify_checksumis called and invokesset_lengthon the progress report.Additional Locations (1)
src/backend/aqua.rs#L309-L312