Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ parameters:
- release

variables:
MSIXVersion: '0.700'
MSIXVersion: '0.800'
solution: '**/DevHomeAzureExtension.sln'
appxPackageDir: 'AppxPackages'
testOutputArtifactDir: 'TestResults'
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/CreateBuildInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Param(
)

$Major = "0"
$Minor = "7"
$Minor = "8"
$Patch = "99" # default to 99 for local builds

$versionSplit = $Version.Split(".");
Expand Down
9 changes: 8 additions & 1 deletion src/AzureExtension/AzureExtension.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
<Content Include="Widgets\Templates\AzureSignInTemplate.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="DevBox\Templates\CreationForm.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="DevBox\Templates\ReviewForm.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
Expand All @@ -58,7 +64,7 @@
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.2.206-beta" />
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.4" />
<PackageReference Include="Microsoft.Windows.DevHome.SDK" Version="0.300.443" />
<PackageReference Include="Microsoft.Windows.DevHome.SDK" Version="0.400.460" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240227000" />
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.205.1" />
<PackageReference Include="Microsoft.VisualStudio.Services.Client" Version="16.205.1" />
Expand All @@ -71,6 +77,7 @@
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="YamlDotNet" Version="15.1.2" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions src/AzureExtension/Contracts/IDevBoxManagementService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT License.

using System.Text.Json;
using AzureExtension.DevBox.DevBoxJsonToCsClasses;
using AzureExtension.DevBox.Models;
using Microsoft.Windows.DevHome.SDK;

Expand Down Expand Up @@ -32,10 +33,10 @@ public interface IDevBoxManagementService
/// <summary>
/// Generates a list of objects that each contain a Dev Center project and the Dev Box pools associated with that project.
/// </summary>
/// <param name="projectsJson">The Json recieved from a rest api that returns a list of Dev Center projects.</param>
/// <param name="projects">The Deserialized Json recieved from a rest api that returns a list of Dev Center projects.</param>
/// <param name="developerId">The DeveloperId associated with the request.</param>
/// <returns>A list of objects where each contain a project and its associated pools.</returns>
public Task<List<DevBoxProjectAndPoolContainer>> GetAllProjectsToPoolsMappingAsync(JsonElement projectsJson, IDeveloperId developerId);
public Task<List<DevBoxProjectAndPoolContainer>> GetAllProjectsToPoolsMappingAsync(DevBoxProjects projects, IDeveloperId developerId);

/// <summary>
/// Initiates a call to create a Dev Box in the Dev Center.
Expand Down
4 changes: 4 additions & 0 deletions src/AzureExtension/Contracts/IPackagesService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

namespace AzureExtension.Contracts;

using Windows.ApplicationModel;

public interface IPackagesService
{
public bool IsPackageInstalled(string packageName);

public PackageVersion GetPackageInstalledVersion(string packageName);
}
5 changes: 2 additions & 3 deletions src/AzureExtension/DataManager/AzureDataManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public partial class AzureDataManager : IAzureDataManager, IDisposable
public static readonly int PullRequestResultLimit = 25;

// Max number of query results to fetch for a given query.
public static readonly int QueryResultLimit = 25;
public static readonly int QueryResultLimit = 26;

// Most data that has not been updated within this time will be removed.
private static readonly TimeSpan DataRetentionTime = TimeSpan.FromDays(1);
Expand Down Expand Up @@ -327,7 +327,6 @@ private async Task UpdateDataForQueriesAsync(DataStoreOperationParameters parame
}

var queryId = new Guid(azureUri.Query);
var count = await witClient.GetQueryResultCountAsync(project.Name, queryId);
var queryResult = await witClient.QueryByIdAsync(project.InternalId, queryId);
if (queryResult == null)
{
Expand Down Expand Up @@ -481,7 +480,7 @@ private async Task UpdateDataForQueriesAsync(DataStoreOperationParameters parame
};

var serializedJson = JsonSerializer.Serialize(workItemsObj, serializerOptions);
Query.GetOrCreate(DataStore, azureUri.Query, project.Id, parameters.DeveloperId.LoginId, getQueryResult.Name, serializedJson, count);
Query.GetOrCreate(DataStore, azureUri.Query, project.Id, parameters.DeveloperId.LoginId, getQueryResult.Name, serializedJson, workItemIds.Count);
} // Foreach AzureUri

return;
Expand Down
23 changes: 15 additions & 8 deletions src/AzureExtension/DevBox/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ public static class Constants
public const string ARGQuery = "{\"query\": \"Resources | where type in~ ('microsoft.devcenter/projects') | where properties['provisioningState'] =~ 'Succeeded' | project id, location, tenantId, name, properties, type\"," +
" \"options\":{\"allowPartialScopes\":true}}";

/// <summary>
/// API version used for enumeration and start, stop, and restart APIs
/// </summary>
/// For stable api's <seealso href="https://learn.microsoft.com/rest/api/devcenter/developer/dev-boxes?view=rest-devcenter-developer-2023-04-01"/>
/// for preview api's <seealso cref="https://github.com/Azure/azure-rest-api-specs/tree/main/specification/devcenter/data-plane/Microsoft.DevCenter/preview"/>
public const string APIVersion = "api-version=2024-05-01-preview";

/// <summary>
/// DevCenter API to get all devboxes
/// </summary>
Expand All @@ -32,6 +39,11 @@ public static class Constants

public const string OperationsParameter = "operations";

/// <summary>
/// Dev Box API to run the winget customization task
/// </summary>
public const string CustomizationAPI = "/customizationgroups/AzureExt";

/// <summary>
/// Gets the Regex pattern for the name of a DevBox. This pattern is used to validate the name and the project name of a DevBox before attempting
/// to create it.
Expand All @@ -50,13 +62,6 @@ public static class Constants
/// </summary>
public const string ManagementPlaneScope = "https://management.azure.com/user_impersonation";

/// <summary>
/// API version used for enumeration and start, stop, and restart APIs
/// </summary>
/// For stable api's <seealso href="https://learn.microsoft.com/rest/api/devcenter/developer/dev-boxes?view=rest-devcenter-developer-2023-04-01"/>
/// for preview api's <seealso cref="https://github.com/Azure/azure-rest-api-specs/tree/main/specification/devcenter/data-plane/Microsoft.DevCenter/preview"/>
public const string APIVersion = "api-version=2024-05-01-preview";

public const string Pools = "pools";

public const string Projects = "projects";
Expand All @@ -76,7 +81,7 @@ public static class Constants

public static readonly TimeSpan OneMinutePeriod = TimeSpan.FromMinutes(1);

public static readonly TimeSpan FiveMinutePeriod = TimeSpan.FromMinutes(5);
public static readonly TimeSpan ThreeMinutePeriod = TimeSpan.FromMinutes(3);

public static readonly TimeSpan OperationDeadline = TimeSpan.FromHours(2);

Expand Down Expand Up @@ -109,6 +114,8 @@ public static class DevBoxProvisioningStates
public const string Deleting = "Deleting";

public const string Updating = "Updating";

public const string Deleted = "Deleted";
}

public static class DevBoxActionStates
Expand Down
Loading