Improvements for failed repo updates #3645
Merged
+579
−512
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.
Problems
Repo.Update
defines an inherently incoherent operation: Refreshing metadata from just one repository to the exclusion of any others that may be configured. This is not something you would ever want to do, because you would end up with an incomplete set of modules in your registry. Registry updates should be from all repos or none.Changes
Repo.Update
is removedckan update
command no longer takes a parameter and always update all reposckan update
's--all
parameter is removed (note that its documentation incorrectly described upgrading modules, which it never did)DownloadTarget.filename
is used as the default forNetAsyncDownloaderDownloadPart.path
, so users ofNetAsyncDownloader
can find the files they requestedNetAsyncDownloaderDownloadPart.Done
andNetAsyncDownloader.onOneCompleted
pass the download's ETag (see Avoid redundant metadata downloads #2682) as a third parameter if available, so users ofNetAsyncDownloader
can save this information after downloading if desiredRepo.UpdateAllRepositories
accepts aNetAsyncDownloader
parameter and uses it to perform its downloads asynchronously, in parallel, with progress bar updates, and with the possibility of cancellationRepo.UpdateRegistryFromTarGz
is renamed toRepo.ModulesFromTarGz
Repo.UpdateRegistryFromZip
is renamed toRepo.ModulesFromZip
Repo.ModulesFromTarGz
andRepo.ModulesFromZip
provide progress bar updates as they process their input filesWait
that were specific toCkanModule
are made generic and able to handlestring
s insteadDownloadsFailedDialog
from Many improvements for failed downloads #3635 is made generic and acceptsobject
s instead ofCkanModule
s, and the module-specific strings it contained are parameters to be supplied by the calling codeMainInstall.cs
is updated to pass module-specific strings to theDownloadsFailedDialog
GUI.Main.UpdateRepo
now:Wait
dialog, and clicking it cancels in progress downloadsDownloadsFailedDialog
from Many improvements for failed downloads #3635 to allow the user to retry or abort the refresh or remove a bad repository:minimizeNotifyIcon_BalloonTipClicked
is moved fromMainRepo.cs
toMainTrayIcon.cs
because it is about the tray iconFixes #1070.
Fixes #1114 (proper transaction handling).
Fixes #1238.
Fixes #1981.