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

Staging - 6/12/24 #3209

Merged
merged 29 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e8b8dc8
Update PI to open on the same monitor as the target application (#3138)
jaholme Jun 6, 2024
099a2c7
Add verification instructions for Quickstart Playground (#3131)
adrastogi Jun 6, 2024
26849be
Revert "Enable FailFastOnErrors for Debug builds" (#3137)
krschau Jun 6, 2024
4765c59
Announcing widget errors and warnings (#3023)
guimafelipe Jun 6, 2024
c300892
Keep About Settings page centered (#3145)
krschau Jun 6, 2024
93298de
Add remaining major UI elements to the bar (#3154)
timkur Jun 6, 2024
9db9295
Remove internal service connection (#3165)
EricJohnson327 Jun 6, 2024
092f7a6
fix snapping/unsnapping when the bar window is moved (#3166)
zadesai Jun 6, 2024
51b856c
Change PI cpu usage to match widget usage (#3171)
dkbennett Jun 7, 2024
e0bb83e
Changing to auto (#3167)
dhoehna Jun 7, 2024
71c6700
Allow SSH widget to show entries with multiple Host aliases (#2664)
gohellp Jun 7, 2024
72ac547
change default metadata to true so dots appear by default (#3163)
bbonaby Jun 8, 2024
99c8dc4
re-add creation error messages (#3149)
bbonaby Jun 8, 2024
f5ca225
Project Ironsides Separator (#3177)
krschau Jun 10, 2024
c1f8ad5
update the system CPU counter name (#3182)
zadesai Jun 10, 2024
4d29769
Add Preview button to SSH Widget (#3168)
krschau Jun 10, 2024
f00c94f
Ironsides - Add detach from target process (#3173)
timkur Jun 10, 2024
c97a889
Create ProcessModuleInfo model and handle FileNotFoundException (#3185)
zadesai Jun 10, 2024
4df356c
Fix title bar colors (#3187)
timkur Jun 10, 2024
78e63d5
Expand PI and lock Ironsides (#3175)
krschau Jun 10, 2024
a367992
Show a dialog to the user when app execution alias is disabled and wa…
zadesai Jun 10, 2024
1ef4594
Fix issues with DPI scaling that were making PI offcenter and too lar…
jaholme Jun 10, 2024
341b35a
Fixed learn-more link (#3189)
andreww-msft Jun 11, 2024
38f5ac1
Make the nav panel wider and user-sizeable (#3192)
andreww-msft Jun 11, 2024
3955492
Update icon glyphs to use SymbolThemeFontFamily (#3195)
andreww-msft Jun 11, 2024
068fb8c
User/kevinve/remove sandbox extension (#3196)
kvega005 Jun 11, 2024
9fc68af
Update utilities node icon and update page layout to be left justifie…
dabhattimsft Jun 12, 2024
2968a90
Update environments telemetry (#3180)
bbonaby Jun 12, 2024
d69e2cc
Update Store Publish and TD Build yaml tasks (#3205)
EricJohnson327 Jun 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions DevHome.sln
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevHome.EnvironmentVariable
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DevHome.Telemetry.Native", "telemetry\DevHome.Telemetry.Native\DevHome.Telemetry.Native.vcxproj", "{8EB52F7D-D216-49FF-BF16-DE06E4695950}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WindowsSandboxExtension", "WindowsSandboxExtension", "{4ACF917D-B2CC-4CF2-8EE1-0EBBB52A69F0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsSandboxExtension", "extensions\WindowsSandboxExtension\WindowsSandboxExtension.csproj", "{118E20E8-FD8A-40CF-83A5-F912B9187787}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{E768781A-D1F7-4C03-B46D-E76354FAB587}"
ProjectSection(SolutionItems) = preProject
tools\scripts\CaptureDevHomeLogs.ps1 = tools\scripts\CaptureDevHomeLogs.ps1
Expand Down Expand Up @@ -723,18 +719,6 @@ Global
{8EB52F7D-D216-49FF-BF16-DE06E4695950}.Release|x64.Build.0 = Release|x64
{8EB52F7D-D216-49FF-BF16-DE06E4695950}.Release|x86.ActiveCfg = Release|Win32
{8EB52F7D-D216-49FF-BF16-DE06E4695950}.Release|x86.Build.0 = Release|Win32
{118E20E8-FD8A-40CF-83A5-F912B9187787}.Debug|arm64.ActiveCfg = Debug|arm64
{118E20E8-FD8A-40CF-83A5-F912B9187787}.Debug|arm64.Build.0 = Debug|arm64
{118E20E8-FD8A-40CF-83A5-F912B9187787}.Debug|x64.ActiveCfg = Debug|x64
{118E20E8-FD8A-40CF-83A5-F912B9187787}.Debug|x64.Build.0 = Debug|x64
{118E20E8-FD8A-40CF-83A5-F912B9187787}.Debug|x86.ActiveCfg = Debug|x86
{118E20E8-FD8A-40CF-83A5-F912B9187787}.Debug|x86.Build.0 = Debug|x86
{118E20E8-FD8A-40CF-83A5-F912B9187787}.Release|arm64.ActiveCfg = Release|arm64
{118E20E8-FD8A-40CF-83A5-F912B9187787}.Release|arm64.Build.0 = Release|arm64
{118E20E8-FD8A-40CF-83A5-F912B9187787}.Release|x64.ActiveCfg = Release|x64
{118E20E8-FD8A-40CF-83A5-F912B9187787}.Release|x64.Build.0 = Release|x64
{118E20E8-FD8A-40CF-83A5-F912B9187787}.Release|x86.ActiveCfg = Release|x86
{118E20E8-FD8A-40CF-83A5-F912B9187787}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -791,8 +775,6 @@ Global
{1317314E-9BDD-4F1C-A76F-22121637A091} = {FAB6FAA7-ADF4-4B65-9831-0C819915E6E1}
{2E5629CA-0D1B-42B1-8D6E-934A6E1E18D9} = {FAB6FAA7-ADF4-4B65-9831-0C819915E6E1}
{5F9749BC-F34E-4F45-933F-61E0F3ED521F} = {FAB6FAA7-ADF4-4B65-9831-0C819915E6E1}
{4ACF917D-B2CC-4CF2-8EE1-0EBBB52A69F0} = {DCAF188B-60C3-4EDB-8049-BAA927FBCD7D}
{118E20E8-FD8A-40CF-83A5-F912B9187787} = {4ACF917D-B2CC-4CF2-8EE1-0EBBB52A69F0}
{E768781A-D1F7-4C03-B46D-E76354FAB587} = {A972EC5B-FC61-4964-A6FF-F9633EB75DFD}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
2 changes: 1 addition & 1 deletion TestingScenarios.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ These are the testing scenarios that need to be validated before shipping a new
1. [Managing Environments](tools/Environments/DevHome.Environments/TestingScenarios/ManageEnvironments.md)
1. [Creating Environment](tools/SetupFlow/DevHome.SetupFlow.UnitTest/TestingScenarios/CreateEnvironment.md)
1. [Setting up an Environment](tools/SetupFlow/DevHome.SetupFlow.UnitTest/TestingScenarios/SetupEnvironment.md)

1. [Quickstart Playground](tools/SetupFlow/DevHome.SetupFlow.UnitTest/TestingScenarios/QuickstartPlayground.md)
28 changes: 11 additions & 17 deletions build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ extends:
- task: NuGetToolInstaller@1

- task: NuGetAuthenticate@1
inputs:
nuGetServiceConnections: 'DevHomeInternal'

- task: PowerShell@2
displayName: Build SDK
Expand Down Expand Up @@ -109,8 +107,6 @@ extends:
- task: NuGetToolInstaller@1

- task: NuGetAuthenticate@1
inputs:
nuGetServiceConnections: 'DevHomeInternal'

- task: PowerShell@2
displayName: Build Stub Packages
Expand Down Expand Up @@ -139,8 +135,6 @@ extends:
- task: NuGetToolInstaller@1

- task: NuGetAuthenticate@1
inputs:
nuGetServiceConnections: 'DevHomeInternal'

- task: PowerShell@2
displayName: Replace Stubbed Files
Expand All @@ -153,7 +147,7 @@ extends:
artifactName: 'SdkNugetPackage'
targetPath: '$(Pipeline.Workspace)\sdkArtifacts\'

- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@3
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@4
displayName: Send and Download Localization Files for Artifacts
condition: and(eq(variables['EnableLocalization'], 'true'), eq(variables['UpdateLocalization'], 'true'))
inputs:
Expand All @@ -168,7 +162,7 @@ extends:
appendRelativeDir: true
pseudoSetting: Included

- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@3
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@4
displayName: Download and Use Localization Files
condition: eq(variables['EnableLocalization'], 'true')
retryCountOnTaskFailure: 2
Expand Down Expand Up @@ -512,7 +506,7 @@ extends:
artifactName: MsixBundle_Release
targetPath: StorePublish

- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@3
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@4
displayName: Download and Use Localization Files
condition: eq(variables['EnableLocalization'], 'true')
retryCountOnTaskFailure: 2
Expand All @@ -537,11 +531,11 @@ extends:
$Files | % { Move-Item -Verbose $_.Directory $_.Directory.Parent.Parent -EA:Ignore }
pwsh: true

- task: MS-RDX-MRO.windows-store-publish-dev.package-task.store-package@2
- task: MS-RDX-MRO.windows-store-publish-dev.package-task.store-package@3
displayName: 'Create Staging StoreBroker Package'
condition: eq(variables['BuildingBranch'], 'staging')
inputs:
serviceEndpoint: 'DevHomeCanary StoreBroker'
ConnectedServiceNameARM: 'DevHomeCanary StoreBroker ServiceConnection'
sbConfigPath: '$(System.DefaultWorkingDirectory)\build\store\canary\SBConfig.json'
sourceFolder: 'StorePublish'
contents: '*.msixbundle'
Expand All @@ -550,11 +544,11 @@ extends:
outSBName: DevHomeStoreSubmissionPackage
pdpInclude: 'PDP.xml'

- task: MS-RDX-MRO.windows-store-publish-dev.publish-task.store-publish@2
- task: MS-RDX-MRO.windows-store-publish-dev.publish-task.store-publish@3
displayName: 'Publish Staging StoreBroker Package'
condition: eq(variables['BuildingBranch'], 'staging')
inputs:
serviceEndpoint: 'DevHomeCanary StoreBroker'
ConnectedServiceNameARM: 'DevHomeCanary StoreBroker ServiceConnection'
appId: 9MX22N5S7HRD
inputMethod: JsonAndZip
jsonPath: '$(System.DefaultWorkingDirectory)\SBOutDir\DevHomeStoreSubmissionPackage.json'
Expand All @@ -565,11 +559,11 @@ extends:
jsonZipUpdateMetadata: true
updateImages: true

- task: MS-RDX-MRO.windows-store-publish-dev.package-task.store-package@2
- task: MS-RDX-MRO.windows-store-publish-dev.package-task.store-package@3
displayName: 'Create Release StoreBroker Package'
condition: eq(variables['BuildingBranch'], 'release')
inputs:
serviceEndpoint: 'DevHome StoreBroker'
ConnectedServiceNameARM: 'DevHome StoreBroker ServiceConnection'
sbConfigPath: '$(System.DefaultWorkingDirectory)\build\store\preview\SBConfig.json'
sourceFolder: 'StorePublish'
contents: '*.msixbundle'
Expand All @@ -578,11 +572,11 @@ extends:
outSBName: DevHomeStoreSubmissionPackage
pdpInclude: 'PDP.xml'

- task: MS-RDX-MRO.windows-store-publish-dev.publish-task.store-publish@2
- task: MS-RDX-MRO.windows-store-publish-dev.publish-task.store-publish@3
displayName: 'Publish Release StoreBroker Package'
condition: eq(variables['BuildingBranch'], 'release')
inputs:
serviceEndpoint: 'DevHome StoreBroker'
ConnectedServiceNameARM: 'DevHome StoreBroker ServiceConnection'
appId: 9N8MHTPHNGVV
inputMethod: JsonAndZip
jsonPath: '$(System.DefaultWorkingDirectory)\SBOutDir\DevHomeStoreSubmissionPackage.json'
Expand Down
2 changes: 1 addition & 1 deletion common/Environments/CustomControls/CardHeader.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ public BitmapImage HeaderIcon
private static readonly DependencyProperty ActionControlTemplateProperty = DependencyProperty.Register(nameof(ActionControlTemplate), typeof(DataTemplate), typeof(CardHeader), new PropertyMetadata(null));
private static readonly DependencyProperty HeaderCaptionProperty = DependencyProperty.Register(nameof(HeaderCaption), typeof(string), typeof(CardHeader), new PropertyMetadata(null));
private static readonly DependencyProperty HeaderIconProperty = DependencyProperty.Register(nameof(HeaderIcon), typeof(BitmapImage), typeof(CardHeader), new PropertyMetadata(null));
private static readonly DependencyProperty OperationsVisibilityProperty = DependencyProperty.Register(nameof(HeaderCaption), typeof(bool), typeof(CardHeader), new PropertyMetadata(false));
private static readonly DependencyProperty OperationsVisibilityProperty = DependencyProperty.Register(nameof(HeaderCaption), typeof(bool), typeof(CardHeader), new PropertyMetadata(true));
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System;

namespace DevHome.Common.Environments.Exceptions;

public class EnvironmentNotificationScriptException : Exception
{
public EnvironmentNotificationScriptException(string message)
: base(message)
{
}
}
21 changes: 21 additions & 0 deletions common/Environments/Helpers/ComputeSystemHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
using System.Runtime.InteropServices.WindowsRuntime;
using System.Threading.Tasks;
using DevHome.Common.Environments.Models;
using DevHome.Common.TelemetryEvents.SetupFlow.Environments;
using Microsoft.Extensions.Hosting;
using Microsoft.UI.Xaml.Media.Imaging;
using Microsoft.Windows.DevHome.SDK;
using Serilog;
Expand Down Expand Up @@ -168,4 +170,23 @@ public static bool RemoveAllItemsAndReplace<T>(ObservableCollection<T> collectio

return false;
}

public static (string DisplayMessage, string DiagnosticText, EnvironmentsTelemetryStatus Status) LogResult(ProviderOperationResult? result, ILogger logger)
{
var telemetryStatus = EnvironmentsTelemetryStatus.Succeeded;

if (result == null)
{
var logErrorMsg = $"The returned result object was null";
logger.Error(logErrorMsg);
return (logErrorMsg, logErrorMsg, EnvironmentsTelemetryStatus.Failed);
}
else if (result.Status == ProviderOperationStatus.Failure)
{
logger.Error(result.ExtendedError, $"Operation failed with error:{result.DiagnosticText}");
telemetryStatus = EnvironmentsTelemetryStatus.Failed;
}

return (result.DisplayMessage, result.DiagnosticText, telemetryStatus);
}
}
43 changes: 41 additions & 2 deletions common/Environments/Helpers/EnvironmentsNotificationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.WinUI.Behaviors;
using DevHome.Common.Environments.Exceptions;
using DevHome.Common.Environments.Models;
using DevHome.Common.Environments.Scripts;
using DevHome.Common.Extensions;
using DevHome.Common.Helpers;
using DevHome.Common.Services;
using DevHome.Common.TelemetryEvents.Environments;
using DevHome.Common.TelemetryEvents.SetupFlow.Environments;
using DevHome.Telemetry;
using Microsoft.UI.Xaml.Controls;
using Microsoft.Windows.DevHome.SDK;
using Serilog;
Expand Down Expand Up @@ -155,6 +160,11 @@ public void DisplayComputeSystemOperationError(string providerDisplayName, strin
[RelayCommand]
private void RestartComputer()
{
TelemetryFactory.Get<ITelemetry>().Log(
"Environment_RestartComputer_Event",
LogLevel.Critical,
new EnvironmentRestartUserEvent());

var startInfo = new ProcessStartInfo
{
WindowStyle = ProcessWindowStyle.Hidden,
Expand Down Expand Up @@ -195,7 +205,9 @@ private void AddUserToHyperVAdminGroupAndEnableHyperV(Notification notification)
startInfo.Verb = "runas";

var process = new Process();
process.StartInfo = startInfo;
process.StartInfo = startInfo;
var telemetryEnablementMap = new Dictionary<FeatureEnablementKind, EnvironmentsTelemetryStatus>();

Task.Run(() =>
{
// Since a UAC prompt will be shown, we need to wait for the process to exit
Expand All @@ -214,37 +226,64 @@ private void AddUserToHyperVAdminGroupAndEnableHyperV(Notification notification)
case 0:
// The script successfully added the user to the Hyper-V Admin Group and enabled the Hyper-V Feature.
_shouldShowHyperVRebootButton = true;
telemetryEnablementMap.Add(FeatureEnablementKind.HyperVFeature, EnvironmentsTelemetryStatus.Succeeded);
telemetryEnablementMap.Add(FeatureEnablementKind.HyperVAdminGroup, EnvironmentsTelemetryStatus.Succeeded);
LogEnablementTelemetry(telemetryEnablementMap);
ShowRestartNotification();
return;
case 2:
// Hyper-V Feature is already enabled and the script successfully added the user to the Hyper-V Admin group.
_shouldShowHyperVRebootButton = true;
telemetryEnablementMap.Add(FeatureEnablementKind.HyperVAdminGroup, EnvironmentsTelemetryStatus.Succeeded);
LogEnablementTelemetry(telemetryEnablementMap);
ShowRestartNotification();
return;
case 3:
// Hyper-V Feature is already enabled and the script failed to add the user to the Hyper-V Admin group.
telemetryEnablementMap.Add(FeatureEnablementKind.HyperVAdminGroup, EnvironmentsTelemetryStatus.Failed);
LogEnablementTelemetry(telemetryEnablementMap, "Failed to enable Hyper-V Feature: exit code 3");
ShowErrorWithRebootAfterExecutionMessage(_stringResource.GetLocalized("UserNotAddedToHyperVAdminGroupMessage"));
return;
case 4:
// The user is already in the Hyper-V Admin group and the script successfully enabled the Hyper-Feature.
telemetryEnablementMap.Add(FeatureEnablementKind.HyperVFeature, EnvironmentsTelemetryStatus.Succeeded);
LogEnablementTelemetry(telemetryEnablementMap);
_shouldShowHyperVRebootButton = true;
ShowRestartNotification();
return;
case 5:
// The user is already in the Hyper-V Admin group and the script failed to enable the Hyper-Feature.
telemetryEnablementMap.Add(FeatureEnablementKind.HyperVFeature, EnvironmentsTelemetryStatus.Failed);
LogEnablementTelemetry(telemetryEnablementMap, "Failed to enable Hyper-V Feature: exit code 5");
ShowErrorWithRebootAfterExecutionMessage(_stringResource.GetLocalized("UnableToEnableHyperVFeatureMessage"));
return;
case 6:
// Display nothing as there is no work to be done
// Display nothing as there is no work to be done, as the feature is enabled and user is in the group.
telemetryEnablementMap.Add(FeatureEnablementKind.HyperVFeature, EnvironmentsTelemetryStatus.NoOperation);
telemetryEnablementMap.Add(FeatureEnablementKind.HyperVAdminGroup, EnvironmentsTelemetryStatus.NoOperation);
LogEnablementTelemetry(telemetryEnablementMap);
return;
}

throw new EnvironmentNotificationScriptException($"HyperV Enablement Script failed with exit code: {process.ExitCode}");
}
catch (Exception ex)
{
_log.Error(ex, "Script failed, we may not have been able to add user to Hyper-V admin group or enable Hyper-V");
telemetryEnablementMap.Add(FeatureEnablementKind.HyperVFeature, EnvironmentsTelemetryStatus.Unknown);
telemetryEnablementMap.Add(FeatureEnablementKind.HyperVAdminGroup, EnvironmentsTelemetryStatus.Unknown);
LogEnablementTelemetry(telemetryEnablementMap, ex.Message);
}

ShowErrorWithRebootAfterExecutionMessage(_stringResource.GetLocalized("UnableToAddUserToHyperVAdminAndEnableHyperVMessage"));
});
}

private void LogEnablementTelemetry(Dictionary<FeatureEnablementKind, EnvironmentsTelemetryStatus> features, string? failureMessage = null)
{
TelemetryFactory.Get<ITelemetry>().Log(
"Environment_FeatureEnablement_Event",
LogLevel.Critical,
new EnvironmentEnablementEvent(features, failureMessage));
}
}
Loading
Loading