-
Notifications
You must be signed in to change notification settings - Fork 324
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
Add installation progress #3901
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
_logger.LogInformation($"Completed package installation for {packageId} from catalog {catalog.GetDescriptiveName()}"); | ||
TelemetryFactory.Get<ITelemetry>().Log("AppInstall_InstallSucceeded", Telemetry.LogLevel.Critical, new AppInstallResultEvent(package.Id, catalog.Catalog.Info.Id), activityId); |
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.
Instead of having different event names for an install failure and install success, have one event name and use either
- different objects
- The same object, but called with different constructors
to differentiate success/failure.
An example is to make the event name AppInstall_InstallationStatus_Event
and have two objects
- AppInstallEvent
- AppInstallErrorEvent
/// </summary> | ||
public sealed class TaskProgress | ||
{ | ||
public TaskProgress() |
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.
Is the empty ctor meant to be called? An empty constructor with no parameters is fishy.
@@ -32,12 +32,19 @@ public WinGetInstallOperation( | |||
} | |||
|
|||
/// <inheritdoc /> | |||
public async Task<IWinGetInstallPackageResult> InstallPackageAsync(WinGetPackageUri packageUri, Guid activityId) | |||
public IAsyncOperationWithProgress<IWinGetInstallPackageResult, WinGetInstallPackageProgress> InstallPackageAsync(WinGetPackageUri packageUri, Guid activityId) |
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.
Question, should all the methods that return a AsyncInfo.Run
also contain a cancelation token that can be passed into the AsyncInfo.Run
call? This way the IAsyncOperation
can be canceled from the UI in the future without much work. Assuming the out of proc installation calls to the WinGet server also handle cancelations as well I guess.
@@ -353,9 +353,17 @@ | |||
<value>Installed {0} (restart required)</value> | |||
<comment>{Locked="{0}"} Label displayed when a package has been installed. {0} is replaced by the package name.</comment> | |||
</data> | |||
<data name="PrepareInstallPackage" xml:space="preserve"> | |||
<value>Preparing to install {0} ...</value> |
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.
I assume the space between the {0}
and the ...
shouldn't be there?
Summary of the pull request
References and relevant issues
Detailed description of the pull request / Additional comments
Validation steps performed
PR checklist