Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit fee146f
Author: Ankit Jain <radical@gmail.com>
Date:   Tue Jul 16 02:06:47 2024 -0400

    Fix up EndToEnd tests

commit bcb2595
Author: Ankit Jain <radical@gmail.com>
Date:   Fri Jul 12 22:16:08 2024 -0400

    workload-tests: use testassets only, unify with others

commit e19e311
Author: Ankit Jain <radical@gmail.com>
Date:   Fri Jul 12 22:00:30 2024 -0400

    restore workloads project

commit 45156b7
Author: Ankit Jain <radical@gmail.com>
Date:   Fri Jul 12 21:38:33 2024 -0400

    clean out hosting, and testproject's dbprops

commit 0df27a5
Author: Ankit Jain <radical@gmail.com>
Date:   Fri Jul 12 21:34:56 2024 -0400

    out-of-repo bits

commit 6bc9921
Author: Ankit Jain <radical@gmail.com>
Date:   Fri Jul 12 21:30:12 2024 -0400

    move out more shared files from workload testing for use in other projects

commit d8ebe90
Author: Ankit Jain <radical@gmail.com>
Date:   Fri Jul 12 21:26:08 2024 -0400

    Add new target to generate a Packages.Versions.props with all the relevant properties, and remove old custom tasks

commit b06fadf
Author: Ankit Jain <radical@gmail.com>
Date:   Fri Jul 12 21:24:29 2024 -0400

    Move '_ExtractTestClassNames' target to tests/Directory.Build.targets for more common use

commit b6cbbd8
Author: Sébastien Ros <sebastienros@gmail.com>
Date:   Mon Jul 15 16:52:38 2024 -0700

    Extract Aspire.Hosting.PostgreSQL.Tests project (dotnet#4862)

commit 639d9cb
Author: Eric Erhardt <eric.erhardt@microsoft.com>
Date:   Mon Jul 15 18:12:46 2024 -0500

    Update runtime, aspnetcore, and extensions versions in a single dependabot PR (dotnet#4911)

    * Update runtime, aspnetcore, and extensions versions in a single dependabot PR

    * Add Orleans group

commit c6ec314
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Jul 15 17:26:56 2024 -0500

    Bump the entityframeworkcore group with 4 updates (dotnet#4899)

    Bumps the entityframeworkcore group with 4 updates: Microsoft.EntityFrameworkCore.Design, Microsoft.EntityFrameworkCore.SqlServer, Microsoft.EntityFrameworkCore.Tools and Microsoft.EntityFrameworkCore.Cosmos.

    Updates `Microsoft.EntityFrameworkCore.Design` from 8.0.6 to 8.0.7

    Updates `Microsoft.EntityFrameworkCore.SqlServer` from 8.0.6 to 8.0.7

    Updates `Microsoft.EntityFrameworkCore.Tools` from 8.0.6 to 8.0.7

    Updates `Microsoft.EntityFrameworkCore.Design` from 8.0.6 to 8.0.7

    Updates `Microsoft.EntityFrameworkCore.Cosmos` from 8.0.6 to 8.0.7

    ---
    updated-dependencies:
    - dependency-name: Microsoft.EntityFrameworkCore.Design
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: entityframeworkcore
    - dependency-name: Microsoft.EntityFrameworkCore.SqlServer
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: entityframeworkcore
    - dependency-name: Microsoft.EntityFrameworkCore.Tools
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: entityframeworkcore
    - dependency-name: Microsoft.EntityFrameworkCore.Design
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: entityframeworkcore
    - dependency-name: Microsoft.EntityFrameworkCore.Cosmos
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: entityframeworkcore
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 861f931
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Jul 15 17:08:53 2024 -0500

    Bump the microsoftextensions group with 7 updates (dotnet#4898)

    Bumps the microsoftextensions group with 7 updates:

    | Package | From | To |
    | --- | --- | --- |
    | Microsoft.Extensions.Configuration.Binder | `8.0.1` | `8.0.2` |
    | Microsoft.Extensions.Http.Resilience | `8.6.0` | `8.7.0` |
    | Microsoft.Extensions.Diagnostics.HealthChecks | `8.0.6` | `8.0.7` |
    | Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore | `8.0.6` | `8.0.7` |
    | Microsoft.Extensions.Caching.StackExchangeRedis | `8.0.6` | `8.0.7` |
    | Microsoft.Extensions.Diagnostics.Testing | `8.6.0` | `8.7.0` |
    | Microsoft.Extensions.TimeProvider.Testing | `8.6.0` | `8.7.0` |

    Updates `Microsoft.Extensions.Configuration.Binder` from 8.0.1 to 8.0.2

    Updates `Microsoft.Extensions.Http.Resilience` from 8.6.0 to 8.7.0

    Updates `Microsoft.Extensions.Diagnostics.HealthChecks` from 8.0.6 to 8.0.7

    Updates `Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore` from 8.0.6 to 8.0.7

    Updates `Microsoft.Extensions.Diagnostics.HealthChecks` from 8.0.6 to 8.0.7

    Updates `Microsoft.Extensions.Caching.StackExchangeRedis` from 8.0.6 to 8.0.7

    Updates `Microsoft.Extensions.Diagnostics.Testing` from 8.6.0 to 8.7.0

    Updates `Microsoft.Extensions.TimeProvider.Testing` from 8.6.0 to 8.7.0

    ---
    updated-dependencies:
    - dependency-name: Microsoft.Extensions.Configuration.Binder
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: microsoftextensions
    - dependency-name: Microsoft.Extensions.Http.Resilience
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: microsoftextensions
    - dependency-name: Microsoft.Extensions.Diagnostics.HealthChecks
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: microsoftextensions
    - dependency-name: Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: microsoftextensions
    - dependency-name: Microsoft.Extensions.Diagnostics.HealthChecks
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: microsoftextensions
    - dependency-name: Microsoft.Extensions.Caching.StackExchangeRedis
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: microsoftextensions
    - dependency-name: Microsoft.Extensions.Diagnostics.Testing
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: microsoftextensions
    - dependency-name: Microsoft.Extensions.TimeProvider.Testing
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: microsoftextensions
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit f38b6cb
Author: Sébastien Ros <sebastienros@gmail.com>
Date:   Mon Jul 15 10:05:11 2024 -0700

    Add cgmanifest.json for templates dependencies (dotnet#4841)

commit 8dcd456
Author: Adam Ratzman <adam@adamratzman.com>
Date:   Mon Jul 15 11:05:23 2024 -0400

    Reduce dashboard log noise (dotnet#4821)

commit 8e55b6e
Author: Eric Erhardt <eric.erhardt@microsoft.com>
Date:   Mon Jul 15 09:44:02 2024 -0500

    Extract Aspire.Hosting.Qdrant.Tests project (dotnet#4879)

    Also add functional tests including volume and bind mount tests.

commit cf816c7
Author: James Newton-King <james@newtonking.com>
Date:   Mon Jul 15 22:26:29 2024 +0800

    Order endpoints in resource details (dotnet#4798)

commit 986c09e
Author: Kevin Jones <vcsjones@github.com>
Date:   Mon Jul 15 05:52:45 2024 -0400

    Remove static SHA1 field (dotnet#4885)

commit 21dfbfb
Author: James Newton-King <james@newtonking.com>
Date:   Mon Jul 15 14:40:58 2024 +0800

    Load theme JavaScript module earlier from HTML (dotnet#4888)

# Conflicts:
#	playground/Directory.Packages.props
#	tests/Aspire.EndToEnd.Tests/Aspire.EndToEnd.Tests.csproj
#	tests/Aspire.EndToEnd.Tests/IntegrationServicesFixture.cs
#	tests/Directory.Build.targets
#	tests/Shared/RepoTesting/Aspire.Testing.Repo.props
#	tests/Shared/RepoTesting/Aspire.Testing.Repo.targets
  • Loading branch information
radical committed Jul 16, 2024
1 parent 539996a commit 4802281
Show file tree
Hide file tree
Showing 30 changed files with 855 additions and 146 deletions.
14 changes: 7 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,11 @@ updates:
AspNetCoreHealthChecks:
patterns:
- "AspNetCore.HealthChecks.*"
AspNetCore:
patterns:
- "Microsoft.AspNetCore.*"
- "Microsoft.Extensions.Features"
AWS:
patterns:
- "AWS.*"
- "AWSSDK.*"
- "OpenTelemetry.*.AWS"
MicrosoftExtensions:
patterns:
- "Microsoft.Extensions.*"
EntityFrameworkCore:
patterns:
- "Microsoft.EntityFrameworkCore.*"
Expand All @@ -50,6 +43,13 @@ updates:
OpenTelemetry:
patterns:
- "OpenTelemetry.*"
Orleans:
patterns:
- "Microsoft.Orleans*"
NetPlatform:
patterns:
- "Microsoft.AspNetCore.*"
- "Microsoft.Extensions.*"
Npgsql:
patterns:
- "Npgsql.*"
Expand Down
14 changes: 14 additions & 0 deletions Aspire.sln
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Hosting", "Hosting", "{830A
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.Redis.Tests", "tests\Aspire.Hosting.Redis.Tests\Aspire.Hosting.Redis.Tests.csproj", "{1BC02557-B78B-48CE-9D3C-488A6B7672F4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.PostgreSQL.Tests", "tests\Aspire.Hosting.PostgreSQL.Tests\Aspire.Hosting.PostgreSQL.Tests.csproj", "{7425E5B2-BC47-4521-AC40-B8CECA329E08}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aspire.Hosting.Qdrant.Tests", "tests\Aspire.Hosting.Qdrant.Tests\Aspire.Hosting.Qdrant.Tests.csproj", "{8E2AA85E-C351-47B4-AF91-58557FAD5840}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -1331,6 +1335,14 @@ Global
{1BC02557-B78B-48CE-9D3C-488A6B7672F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1BC02557-B78B-48CE-9D3C-488A6B7672F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1BC02557-B78B-48CE-9D3C-488A6B7672F4}.Release|Any CPU.Build.0 = Release|Any CPU
{8E2AA85E-C351-47B4-AF91-58557FAD5840}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E2AA85E-C351-47B4-AF91-58557FAD5840}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E2AA85E-C351-47B4-AF91-58557FAD5840}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E2AA85E-C351-47B4-AF91-58557FAD5840}.Release|Any CPU.Build.0 = Release|Any CPU
{7425E5B2-BC47-4521-AC40-B8CECA329E08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7425E5B2-BC47-4521-AC40-B8CECA329E08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7425E5B2-BC47-4521-AC40-B8CECA329E08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7425E5B2-BC47-4521-AC40-B8CECA329E08}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1575,6 +1587,8 @@ Global
{C424395C-1235-41A4-BF55-07880A04368C} = {4981B3A5-4AFD-4191-BF7D-8692D9783D60}
{830A89EC-4029-4753-B25A-068BAE37DEC7} = {4981B3A5-4AFD-4191-BF7D-8692D9783D60}
{1BC02557-B78B-48CE-9D3C-488A6B7672F4} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
{8E2AA85E-C351-47B4-AF91-58557FAD5840} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
{7425E5B2-BC47-4521-AC40-B8CECA329E08} = {830A89EC-4029-4753-B25A-068BAE37DEC7}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6DCEDFEC-988E-4CB3-B45B-191EB5086E0C}
Expand Down
22 changes: 11 additions & 11 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
<MicrosoftDotNetXUnitExtensionsPackageVersion>8.0.0-beta.24360.5</MicrosoftDotNetXUnitExtensionsPackageVersion>
<MicrosoftDotNetBuildTasksInstallersPackageVersion>8.0.0-beta.24360.5</MicrosoftDotNetBuildTasksInstallersPackageVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>8.0.0-beta.24360.5</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftExtensionsHttpResiliencePackageVersion>8.6.0</MicrosoftExtensionsHttpResiliencePackageVersion>
<MicrosoftExtensionsDiagnosticsTestingPackageVersion>8.6.0</MicrosoftExtensionsDiagnosticsTestingPackageVersion>
<MicrosoftExtensionsHttpResiliencePackageVersion>8.7.0</MicrosoftExtensionsHttpResiliencePackageVersion>
<MicrosoftExtensionsDiagnosticsTestingPackageVersion>8.7.0</MicrosoftExtensionsDiagnosticsTestingPackageVersion>
<MicrosoftExtensionsConfigurationAbstractionsPackageVersion>8.0.0</MicrosoftExtensionsConfigurationAbstractionsPackageVersion>
<MicrosoftExtensionsConfigurationBinderPackageVersion>8.0.1</MicrosoftExtensionsConfigurationBinderPackageVersion>
<MicrosoftExtensionsConfigurationBinderPackageVersion>8.0.2</MicrosoftExtensionsConfigurationBinderPackageVersion>
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>8.0.1</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
<MicrosoftExtensionsHostingAbstractionsPackageVersion>8.0.0</MicrosoftExtensionsHostingAbstractionsPackageVersion>
<MicrosoftExtensionsHostingPackageVersion>8.0.0</MicrosoftExtensionsHostingPackageVersion>
Expand All @@ -48,16 +48,16 @@
<MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>8.0.6</MicrosoftAspNetCoreAuthenticationOpenIdConnectPackageVersion>
<MicrosoftAspNetCoreOpenApiPackageVersion>8.0.6</MicrosoftAspNetCoreOpenApiPackageVersion>
<MicrosoftAspNetCoreOutputCachingStackExchangeRedisPackageVersion>8.0.6</MicrosoftAspNetCoreOutputCachingStackExchangeRedisPackageVersion>
<MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>8.0.6</MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksEntityFrameworkCorePackageVersion>8.0.6</MicrosoftExtensionsDiagnosticsHealthChecksEntityFrameworkCorePackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>8.0.6</MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>
<MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>8.0.7</MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksEntityFrameworkCorePackageVersion>8.0.7</MicrosoftExtensionsDiagnosticsHealthChecksEntityFrameworkCorePackageVersion>
<MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>8.0.7</MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>
<MicrosoftExtensionsFeaturesPackageVersion>8.0.6</MicrosoftExtensionsFeaturesPackageVersion>
<MicrosoftExtensionsTimeProviderTestingVersion>8.6.0</MicrosoftExtensionsTimeProviderTestingVersion>
<MicrosoftExtensionsTimeProviderTestingVersion>8.7.0</MicrosoftExtensionsTimeProviderTestingVersion>
<!-- EF -->
<MicrosoftEntityFrameworkCoreCosmosPackageVersion>8.0.6</MicrosoftEntityFrameworkCoreCosmosPackageVersion>
<MicrosoftEntityFrameworkCoreDesignPackageVersion>8.0.6</MicrosoftEntityFrameworkCoreDesignPackageVersion>
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>8.0.6</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
<MicrosoftEntityFrameworkCoreToolsPackageVersion>8.0.6</MicrosoftEntityFrameworkCoreToolsPackageVersion>
<MicrosoftEntityFrameworkCoreCosmosPackageVersion>8.0.7</MicrosoftEntityFrameworkCoreCosmosPackageVersion>
<MicrosoftEntityFrameworkCoreDesignPackageVersion>8.0.7</MicrosoftEntityFrameworkCoreDesignPackageVersion>
<MicrosoftEntityFrameworkCoreSqlServerPackageVersion>8.0.7</MicrosoftEntityFrameworkCoreSqlServerPackageVersion>
<MicrosoftEntityFrameworkCoreToolsPackageVersion>8.0.7</MicrosoftEntityFrameworkCoreToolsPackageVersion>
<MicrosoftNETRuntimeWorkloadTestingInternalVersion>9.0.0-preview.5.24272.3</MicrosoftNETRuntimeWorkloadTestingInternalVersion>
</PropertyGroup>
</Project>
8 changes: 8 additions & 0 deletions src/Aspire.Dashboard/Components/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,13 @@
<Routes @rendermode="@(new InteractiveServerRenderMode(prerender: false))" />
<script src="_framework/blazor.web.js"></script>
<script src="js/app.js"></script>

@*
Directly reference theme and dependencies from HTML so they load quickly.
It's much faster to load them here than wait for module load from Blazor interop.
Load time is important here because the theme should be applied ASAP.
*@
<script src="js/app-theme.js" type="module"></script>
<script src="_content/Microsoft.FluentUI.AspNetCore.Components/Microsoft.FluentUI.AspNetCore.Components.lib.module.js" type="module"></script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
_jsModule = await JS.InvokeAsync<IJSObjectReference>("import", "/js/theme.js");
_jsModule = await JS.InvokeAsync<IJSObjectReference>("import", "/js/app-theme.js");
_currentSetting = await _jsModule.InvokeAsync<string>("getThemeCookieValue");
StateHasChanged();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Dashboard/Components/Layout/MainLayout.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
_jsModule = await JS.InvokeAsync<IJSObjectReference>("import", "/js/theme.js");
_jsModule = await JS.InvokeAsync<IJSObjectReference>("import", "/js/app-theme.js");
_shortcutManagerReference = DotNetObjectReference.Create(ShortcutManager);
_keyboardHandlers = await JS.InvokeAsync<IJSObjectReference>("window.registerGlobalKeydownListener", _shortcutManagerReference);
ShortcutManager.AddGlobalKeydownListener(this);
Expand Down
11 changes: 0 additions & 11 deletions src/Aspire.Dashboard/Components/Pages/Resources.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -363,17 +363,6 @@ private List<DisplayedEndpoint> GetDisplayedEndpoints(ResourceViewModel resource

additionalMessage = null;

// Make sure that endpoints have a consistent ordering. Show https first, then everything else.
return [.. GetEndpoints(resource)
.OrderByDescending(e => e.Url?.StartsWith("https") == true)
.ThenBy(e=> e.Url ?? e.Text)];
}

/// <summary>
/// A resource has services and endpoints. These can overlap. This method attempts to return a single list without duplicates.
/// </summary>
private static List<DisplayedEndpoint> GetEndpoints(ResourceViewModel resource)
{
return ResourceEndpointHelpers.GetEndpoints(resource, includeInteralUrls: false);
}

Expand Down
6 changes: 6 additions & 0 deletions src/Aspire.Dashboard/DashboardWebApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ public DashboardWebApplication(
builder.Logging.AddFilter("Microsoft.AspNetCore", LogLevel.Warning);
builder.Logging.AddFilter("Microsoft.Hosting.Lifetime", LogLevel.None);
builder.Logging.AddFilter("Microsoft.AspNetCore.Server.Kestrel", LogLevel.Error);
#else
// Don't log routine dashboard HTTP request info or static file access
// These logs generate a lot of noise when locally debugging.
builder.Logging.AddFilter("Microsoft.AspNetCore.Hosting.Diagnostics", LogLevel.Warning);
builder.Logging.AddFilter("Microsoft.AspNetCore.Routing.EndpointMiddleware", LogLevel.Warning);
builder.Logging.AddFilter("Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware", LogLevel.Warning);
#endif

// Allow for a user specified JSON config file on disk. Throw an error if the specified file doesn't exist.
Expand Down
13 changes: 12 additions & 1 deletion src/Aspire.Dashboard/Model/ResourceEndpointHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,18 @@ public static List<DisplayedEndpoint> GetEndpoints(ResourceViewModel resource, b
}
}

return endpoints;
// Make sure that endpoints have a consistent ordering.
// Order:
// - https
// - other urls
// - endpoint name
var orderedEndpoints = endpoints
.OrderByDescending(e => e.Url?.StartsWith("https") == true)
.ThenByDescending(e => e.Url != null)
.ThenBy(e => e.Name, StringComparers.EndpointAnnotationName)
.ToList();

return orderedEndpoints;
}
}

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Aspire.Hosting.Tests" />
<InternalsVisibleTo Include="Aspire.Hosting.PostgreSQL.Tests" />
</ItemGroup>

</Project>
4 changes: 1 addition & 3 deletions src/Aspire.Hosting/Utils/ImageNameGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ namespace Aspire.Hosting.Utils;

internal static class ImageNameGenerator
{
private static readonly SHA1 s_sha1 = SHA1.Create();

public static string GenerateImageName<T>(this IResourceBuilder<T> builder) where T: IResource
{
var bytes = Encoding.UTF8.GetBytes(builder.ApplicationBuilder.AppHostDirectory);
var hash = s_sha1.ComputeHash(bytes);
var hash = SHA1.HashData(bytes);
var hex = Convert.ToHexString(hash).ToLower();
return $"{builder.Resource.Name}-image-{hex}";
}
Expand Down
132 changes: 132 additions & 0 deletions src/Aspire.ProjectTemplates/cgmanifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
"$schema": "https://json.schemastore.org/component-detection-manifest.json",
"version": 1,
"registrations": [
{
"component": {
"type": "nuget",
"nuget": {
"name": "OpenTelemetry.Exporter.OpenTelemetryProtocol",
"version": "1.9.0"
}
}
},
{
"component": {
"type": "nuget",
"nuget": {
"name": "OpenTelemetry.Extensions.Hosting",
"version": "1.9.0"
}
}
},
{
"component": {
"type": "nuget",
"nuget": {
"name": "OpenTelemetry.Instrumentation.AspNetCore",
"version": "1.9.0"
}
}
},
{
"component": {
"type": "nuget",
"nuget": {
"name": "OpenTelemetry.Instrumentation.Http",
"version": "1.9.0"
}
}
},
{
"component": {
"type": "nuget",
"nuget": {
"name": "OpenTelemetry.Instrumentation.Runtime",
"version": "1.9.0"
}
}
},
{
"component": {
"type": "nuget",
"nuget": {
"name": "Microsoft.Extensions.Http.Resilience",
"version": "8.6.0"
}
}
},
{
"component": {
"type": "nuget",
"nuget": {
"name": "Microsoft.NET.Test.Sdk",
"version": "17.10.0"
}
}
},
{
"component": {
"type": "nuget",
"nuget": {
"name": "MSTest",
"version": "3.4.3"
}
}
},
{
"component": {
"type": "nuget",
"nuget": {
"name": "coverlet.collector",
"version": "6.0.2"
}
}
},
{
"component": {
"type": "nuget",
"nuget": {
"name": "NUnit",
"version": "4.1.0"
}
}
},
{
"component": {
"type": "nuget",
"nuget": {
"name": "NUnit.Analyzers",
"version": "4.2.0"
}
}
},
{
"component": {
"type": "nuget",
"nuget": {
"name": "NUnit3TestAdapter",
"version": "4.5.0"
}
}
},
{
"component": {
"type": "nuget",
"nuget": {
"name": "xunit",
"version": "2.9.0"
}
}
},
{
"component": {
"type": "nuget",
"nuget": {
"name": "xunit.runner.visualstudio",
"version": "2.8.2"
}
}
}
]
}
2 changes: 1 addition & 1 deletion src/Shared/SecretsStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.Extensions.SecretManager.Tools.Internal;
/// <summary>
/// Adapted from dotnet user-secrets at https://github.com/dotnet/aspnetcore/blob/482730a4c773ee4b3ae9525186d10999c89b556d/src/Tools/dotnet-user-secrets/src/Internal/SecretsStore.cs
/// </summary>
internal class SecretsStore
internal sealed class SecretsStore
{
private readonly string _secretsFilePath;
private readonly Dictionary<string, string?> _secrets;
Expand Down
19 changes: 19 additions & 0 deletions tests/Aspire.Dashboard.Tests/Model/ResourceEndpointHelpersTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,25 @@ public void GetEndpoints_IncludesIncludeInternalUrls()
});
}

[Fact]
public void GetEndpoints_OrderByName()
{
var endpoints = GetEndpoints(CreateResource([
new("a", new("http://localhost:8080"), isInternal: false),
new("C", new("http://localhost:8080"), isInternal: false),
new("D", new("tcp://localhost:8080"), isInternal: false),
new("B", new("tcp://localhost:8080"), isInternal: false),
new("Z", new("https://localhost:8080"), isInternal: false)
]));

Assert.Collection(endpoints,
e => Assert.Equal("Z", e.Name),
e => Assert.Equal("a", e.Name),
e => Assert.Equal("C", e.Name),
e => Assert.Equal("B", e.Name),
e => Assert.Equal("D", e.Name));
}

private static ResourceViewModel CreateResource(ImmutableArray<UrlViewModel> urls)
{
return new ResourceViewModel
Expand Down
Loading

0 comments on commit 4802281

Please sign in to comment.