Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add installation progress #3901

wants to merge 4 commits into from

Conversation

AmelBawa-msft
Copy link
Contributor

@AmelBawa-msft AmelBawa-msft commented Sep 25, 2024

Summary of the pull request

  • Added installation progress for applications

progress

References and relevant issues

Detailed description of the pull request / Additional comments

Validation steps performed

PR checklist

@AmelBawa-msft AmelBawa-msft marked this pull request as ready for review September 26, 2024 20:24
@AmelBawa-msft AmelBawa-msft requested a review from a team September 26, 2024 20:24
}

_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);
Copy link
Contributor

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

  1. different objects
  2. 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

  1. AppInstallEvent
  2. AppInstallErrorEvent

/// </summary>
public sealed class TaskProgress
{
public TaskProgress()
Copy link
Contributor

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)
Copy link
Contributor

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>
Copy link
Contributor

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?

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.

Machine configuration view should show the progress of what are been installed by WinGet.
3 participants