-
Notifications
You must be signed in to change notification settings - Fork 22
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
Show Download Progress #609
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a15aa03
to
5d454fb
Compare
cb39332
to
d67203d
Compare
57e0ddc
to
4a37b66
Compare
82d8044
to
468533a
Compare
joseivanlopez
approved these changes
Apr 7, 2022
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.
LGTM
✔️ Internal Jenkins job #4 successfully finished |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Target Branch / Product
This is for SLE-15-SP4.
Version for master: #612
Bugzilla
https://bugzilla.suse.com/show_bug.cgi?id=1195608
Trello
https://trello.com/c/38oLzang/
Problem
During package installation (only in the installed system, not during installation) there was no visual feedback while packages were being downloaded, only when all downloads were finished and it started actually installing the downloaded packages: The user saw only a progress bar stuck at 0% for minutes while the download was in progress.
During system installation, this was not a problem since download and installation are now (since SLE-15 SP4 / Leap 15.4) done in parallel.
Cause
After the progress reporting was greatly simplified to enable parallel actions in libzypp, there was only one single progress bar, no lists of current actions (which had included downloads).
Fix
Now displaying both the downloads and the installed / upgraded / removed packages in that single progress bar.
Total: Expected (unpacked) install sizes of all packages + expected (packed) download sizes
Current: Finished install sizes + finished download sizes + partial download sizes
Video
no-popup.mp4
Rationale
Of course this is a little apples vs. oranges: Downloading 100 MB of RPMs rarely takes the same time as installing 100 MB of RPMs. But this makes the progress bar move during all waiting times, so the user can see that there is progress.
While doing similar operations on the command line, many seasoned users do
And only when this is finished:
This makes sure that this is a transaction, and it doesn't get stuck in the middle because of some packages that could not be downloaded. The current policy of the YaST software module in the installed system does very much the same: First, all required packages are downloaded, and when that is finished, the actual install / upgrade / remove operations are started.
Depending on the user's Internet connection, the download phase may take considerably longer than the installation phase, so the progress bar will very likely move quicker during the second phase. But it is very unlikely that any user will complain when it speeds up during the process; that will be very welcome by most users.
Parallel Download and Installation
During system installation, we are now using a new libzypp mode that does downloading and installing packages in parallel, so the code needs to take that into account.
The first naive approach was to just check for
Mode.normal
(i.e. only in the installed system, not during system installation / system upgrade / AutoYaST installation). That works right now, but who knows when we will start using that new mode also in other scenarios.So the code now keeps track in the callbacks (
DownloadStart()
,DownloadProgress()
,DownloadEnd()
,PkgInstallStart()
, ...) if there is any indication that a package starts being installed while another one is downloaded, and changes to the parallel_download mode, i.e. the progress bar only takes the package installation into account and not the downloads anymore; i.e. it auto-adapts.The initial default is still based on
Mode.normal
, though.Other Changes
PackageSlideShow
module:@xxx_list.size
instead wherever needed.DownloadError()
case into a separate method for clearer control flow; the uncommon case should not obscure the common one (download finished normally), much less with always passing 2 (!) out of 3 method parameters for the uncommon error case.Ops.Add()
, seriously?!)Installer Self-Update?
This affects only the installed system, not the system installation or upgrade, so an installer self-update is not needed.
Related PR