Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Comments

Showing failures and log info in config flow; Fixing 'cloudpc-app' popup#181

Merged
huzaifa-d merged 8 commits intomainfrom
user/modanish/Log
May 15, 2024
Merged

Showing failures and log info in config flow; Fixing 'cloudpc-app' popup#181
huzaifa-d merged 8 commits intomainfrom
user/modanish/Log

Conversation

@huzaifa-d
Copy link
Contributor

@huzaifa-d huzaifa-d commented May 14, 2024

Summary of the issues

  1. The configuration flow for Dev Boxes didn't show any failures since the API didn't support it.
  2. The extension launches a popup if Windows App isn't installed
    image

Detailed description of the pull request / Additional comments

  1. The Dev Box configuration has been fixed and the API now correctly sends a "Failure" status. The extension has been changed accordingly to show the status on the UI. Additionally, a log API is called for the raw log, parsed and the relevant error line is now sent back to Dev Home to be shown on the UI.

image
image

  1. The extension now checks to see if Windows App is installed before trying to try associated protocol launches

Validation steps performed

Tested the configuration flow on various Dev Boxes

PR checklist

@huzaifa-d huzaifa-d marked this pull request as ready for review May 14, 2024 20:43
@@ -685,11 +698,12 @@ public IAsyncOperation<ComputeSystemOperationResult> DoPinActionAsync(string loc
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand, how is DevHome calling these functions if GetOperations() within this file doesn't return PinToStartMenu and PinToTaskbar? From reading the code it seems to me like they should be blocked from getting called from DevHome? What am I missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetIsPinnedToStartMenuAsync() is the function that gets called. Does that make sense?

Copy link
Contributor

@bbonaby bbonaby May 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@safmswork I believe its due to the GetPinStatusAsync method call. In that method we still call into the WindowsApp protocol launch here:

Process? p = Process.Start(psi);

**Edit: Oh misunderstood what you meant, but I see what you mean, we have a check in Dev Home which should prevent these calls. Perhaps there is something going on where users have multiple azure extensions installed? **

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but who calls GetPinStatusAsync? The only one is GetIsPinnedToStartMenuAsync and GetIsPinnedToTaskbarAsync . And Devhome only calls those if:
if (supportedOperations.HasFlag(ComputeSystemOperations.PinToTaskbar))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I guess we need to confirm if the versioning method is returning the correct value. Assuming Huzaifa and Kevin don't have a version that should support pinning. Then they will have the pinning operations. Which would then make GetPinStatusAsync and the other methods callable from Dev Home. Which would lead to the computer not being able to protocol launch this:

private static readonly CompositeFormat ProtocolPinString = CompositeFormat.Parse("ms-cloudpc:pin?location={0}&request={1}&cpcid={2}&workspaceName={3}&environment={4}&username={5}&version=0.0&source=DevHome");

So we just need to get what version of Windows app they're using

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe that's it, maybe the WindowsApp version that I hardcoded into MinimumWindowsAppVersion is wrong somehow. @huzaifa-d what version of WindowsApp did you get the repro on?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still want to check in this change? Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey yea I think its fine, to have the extra check, just for safety now that we have found the issue to be a dev home issue and not really an azure extension issue. So I think this is ok.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General note: while we can check the enum flag in Dev Home there are always races that can happen due to multi-leg cross-process communication. We can get a flag saying that some operation is supported at the time of the check, but by the time of the next call to the extension the operation may not be supported anymore. So, both sides should handle this situation gracefully and not blame the other side that the call should never happen or that the operation status was reported incorrectly.

Co-authored-by: sshilov7 <51001703+sshilov7@users.noreply.github.com>
@huzaifa-d huzaifa-d merged commit e0e4b8b into main May 15, 2024
@huzaifa-d huzaifa-d deleted the user/modanish/Log branch June 20, 2024 21:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Customization flow needs to handle failure once supported

5 participants