Skip to content

Stop stacking progress bars when a wheel download is retried#19111

Open
nooscraft wants to merge 1 commit intoastral-sh:mainfrom
nooscraft:fix/clear-progress-bar-on-download-retry
Open

Stop stacking progress bars when a wheel download is retried#19111
nooscraft wants to merge 1 commit intoastral-sh:mainfrom
nooscraft:fix/clear-progress-bar-on-download-retry

Conversation

@nooscraft
Copy link
Copy Markdown
Contributor

Progress bars for wheel downloads were started on every retry attempt, but only completed on success. When a transient network failure triggered the outer HTTP retry loop, failed attempts left the old bar behind, so retries could show stacked duplicate progress bars for the same package.

A new DownloadProgress guard calls on_download_complete in its Drop impl. Both stream_wheel and download_wheel create the guard and let Drop clear the bar, so it is finalized whether the download succeeds or bails out via ?. Covered by unit tests in distribution_database.rs that check the start/drop pair and that a failure-failure-success retry sequence keeps start/complete counts balanced and paired by id.

Closes #19110...

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.

Duplicated package names when installing

1 participant