-
Notifications
You must be signed in to change notification settings - Fork 74
feat: unify progress handling #1356
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b5b4863
feat(dbus): progress can have predefined steps
imobachgs 3bcfd5b
feat(rust): expose predefined progress steps
imobachgs f5e9c1f
fix(dbus): fix installation progress
imobachgs 596c74f
feat(web): implement a unified reporting mechanism
imobachgs 8148f08
fix(dbus): improve steps descriptions
imobachgs f0c5135
fix: use camelCase in progress-related events
imobachgs 2ff5862
Merge branch 'master' into better-progress
imobachgs 5810dab
doc: update changes files
imobachgs 360ff3c
fix: updates from code review
imobachgs 82265b5
fix(web): make ESLint happy
imobachgs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -132,11 +132,11 @@ def probe | |
| logger.info "Probing software" | ||
|
|
||
| if repositories.empty? | ||
| start_progress(3) | ||
| start_progress_with_size(3) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this case the descriptions are known in advance. Should we use the |
||
| Yast::PackageCallbacks.InitPackageCallbacks(logger) | ||
| progress.step(_("Initializing sources")) { add_base_repos } | ||
| else | ||
| start_progress(2) | ||
| start_progress_with_size(2) | ||
| end | ||
|
|
||
| progress.step(_("Refreshing repositories metadata")) { repositories.load } | ||
|
|
@@ -178,7 +178,7 @@ def install | |
| Yast::Pkg.TargetLoad | ||
|
|
||
| steps = proposal.packages_count | ||
| start_progress(steps) | ||
| start_progress_with_size(steps) | ||
| Callbacks::Progress.setup(steps, progress) | ||
|
|
||
| # TODO: error handling | ||
|
|
@@ -197,14 +197,11 @@ def install | |
|
|
||
| # Writes the repositories information to the installed system | ||
| def finish | ||
| start_progress(1) | ||
| progress.step(_("Writing repositories to the target system")) do | ||
| Yast::Pkg.SourceSaveAll | ||
| Yast::Pkg.TargetFinish | ||
| # copy the libzypp caches to the target | ||
| copy_zypp_to_target | ||
| registration.finish | ||
| end | ||
| Yast::Pkg.SourceSaveAll | ||
| Yast::Pkg.TargetFinish | ||
| # copy the libzypp caches to the target | ||
| copy_zypp_to_target | ||
| registration.finish | ||
| end | ||
|
|
||
| # Determine whether the given tag is provided by the selected packages | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.