From 07df6658e62e8e6aad70fa39f15357fea6c3307f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" Date: Thu, 22 May 2025 23:28:20 +0000 Subject: [PATCH 1/5] Update dependencies from https://github.com/microsoft/usvc-apiserver build 0.15.1 Microsoft.DeveloperControlPlane.darwin-amd64 , Microsoft.DeveloperControlPlane.darwin-arm64 , Microsoft.DeveloperControlPlane.linux-amd64 , Microsoft.DeveloperControlPlane.linux-arm64 , Microsoft.DeveloperControlPlane.windows-386 , Microsoft.DeveloperControlPlane.windows-amd64 , Microsoft.DeveloperControlPlane.windows-arm64 From Version 0.15.0 -> To Version 0.15.1 --- eng/Version.Details.xml | 28 ++++++++++++++-------------- eng/Versions.props | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3b7376eb1c7..f41c93070fa 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,33 +1,33 @@ - + https://github.com/microsoft/usvc-apiserver - d00e1c008aaa8cfae2f74d26f4152c9c24aabe47 + 24290648d8381494bf015e262662262990b40413 - + https://github.com/microsoft/usvc-apiserver - d00e1c008aaa8cfae2f74d26f4152c9c24aabe47 + 24290648d8381494bf015e262662262990b40413 - + https://github.com/microsoft/usvc-apiserver - d00e1c008aaa8cfae2f74d26f4152c9c24aabe47 + 24290648d8381494bf015e262662262990b40413 - + https://github.com/microsoft/usvc-apiserver - d00e1c008aaa8cfae2f74d26f4152c9c24aabe47 + 24290648d8381494bf015e262662262990b40413 - + https://github.com/microsoft/usvc-apiserver - d00e1c008aaa8cfae2f74d26f4152c9c24aabe47 + 24290648d8381494bf015e262662262990b40413 - + https://github.com/microsoft/usvc-apiserver - d00e1c008aaa8cfae2f74d26f4152c9c24aabe47 + 24290648d8381494bf015e262662262990b40413 - + https://github.com/microsoft/usvc-apiserver - d00e1c008aaa8cfae2f74d26f4152c9c24aabe47 + 24290648d8381494bf015e262662262990b40413 https://dev.azure.com/dnceng/internal/_git/dotnet-extensions diff --git a/eng/Versions.props b/eng/Versions.props index 38fd803cc0b..26c0015e735 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -25,13 +25,13 @@ 8.0.100-rtm.23512.16 - 0.15.0 - 0.15.0 - 0.15.0 - 0.15.0 - 0.15.0 - 0.15.0 - 0.15.0 + 0.15.1 + 0.15.1 + 0.15.1 + 0.15.1 + 0.15.1 + 0.15.1 + 0.15.1 9.0.0-beta.25225.6 10.0.0-beta.25178.1 From d76fc378a1d9c5f5fe40dd6e1c17894f35f9079e Mon Sep 17 00:00:00 2001 From: David Negstad Date: Thu, 22 May 2025 18:50:05 -0700 Subject: [PATCH 2/5] Ensure garnet can be accessed from outside the container --- src/Aspire.Hosting.Garnet/GarnetBuilderExtensions.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Aspire.Hosting.Garnet/GarnetBuilderExtensions.cs b/src/Aspire.Hosting.Garnet/GarnetBuilderExtensions.cs index 17ae0fe0a6b..29940acac4e 100644 --- a/src/Aspire.Hosting.Garnet/GarnetBuilderExtensions.cs +++ b/src/Aspire.Hosting.Garnet/GarnetBuilderExtensions.cs @@ -102,7 +102,7 @@ public static IResourceBuilder AddGarnet(this IDistributedApplic // StackExchange.Redis doesn't support passwords with commas. // See https://github.com/StackExchange/StackExchange.Redis/issues/680 and - // https://github.com/Azure/azure-dev/issues/4848 + // https://github.com/Azure/azure-dev/issues/4848 var passwordParameter = password?.Resource ?? ParameterResourceBuilderExtensions.CreateDefaultPasswordParameter(builder, $"{name}-password", special: false); var garnet = new GarnetResource(name, passwordParameter); @@ -140,7 +140,9 @@ public static IResourceBuilder AddGarnet(this IDistributedApplic { var garnetCommand = new List { - "/app/GarnetServer" + "/app/GarnetServer", + "--protected-mode", // Disable protected mode so that garnet can be accessed from outside the container + "no" }; if (garnet.PasswordParameter is { } password) From 89e8f9a6dc94c468516a6a2ae37a9a9358086bd5 Mon Sep 17 00:00:00 2001 From: David Negstad Date: Thu, 22 May 2025 18:57:58 -0700 Subject: [PATCH 3/5] Fix additional garnet tests --- tests/Aspire.Hosting.Garnet.Tests/AddGarnetTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Aspire.Hosting.Garnet.Tests/AddGarnetTests.cs b/tests/Aspire.Hosting.Garnet.Tests/AddGarnetTests.cs index 1e7c3916c77..16d20518643 100644 --- a/tests/Aspire.Hosting.Garnet.Tests/AddGarnetTests.cs +++ b/tests/Aspire.Hosting.Garnet.Tests/AddGarnetTests.cs @@ -101,7 +101,7 @@ public async Task VerifyWithoutPasswordManifest() "entrypoint": "/bin/sh", "args": [ "-c", - "/app/GarnetServer --auth Password --password $GARNET_PASSWORD" + "/app/GarnetServer --protected-mode no --auth Password --password $GARNET_PASSWORD" ], "env": { "GARNET_PASSWORD": "{myGarnet-password.value}" @@ -141,7 +141,7 @@ public async Task VerifyWithPasswordManifest() "entrypoint": "/bin/sh", "args": [ "-c", - "/app/GarnetServer --auth Password --password $GARNET_PASSWORD" + "/app/GarnetServer --protected-mode no --auth Password --password $GARNET_PASSWORD" ], "env": { "GARNET_PASSWORD": "{pass.value}" @@ -177,7 +177,7 @@ public async Task VerifyManifestWithPersistence() "entrypoint": "/bin/sh", "args": [ "-c", - "/app/GarnetServer --auth Password --password $GARNET_PASSWORD --checkpointdir /data/checkpoints --recover --aof --aof-commit-freq 60000" + "/app/GarnetServer --protected-mode no --auth Password --password $GARNET_PASSWORD --checkpointdir /data/checkpoints --recover --aof --aof-commit-freq 60000" ], "env": { "GARNET_PASSWORD": "{myGarnet-password.value}" From be1c6957d5314db670da08844649819549e7f24e Mon Sep 17 00:00:00 2001 From: David Negstad Date: Thu, 22 May 2025 20:28:46 -0700 Subject: [PATCH 4/5] Make sure tests wait until the ID is actually returned --- .../MySqlFunctionalTests.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/Aspire.Hosting.MySql.Tests/MySqlFunctionalTests.cs b/tests/Aspire.Hosting.MySql.Tests/MySqlFunctionalTests.cs index 4908fc18bd3..c5039cd9c26 100644 --- a/tests/Aspire.Hosting.MySql.Tests/MySqlFunctionalTests.cs +++ b/tests/Aspire.Hosting.MySql.Tests/MySqlFunctionalTests.cs @@ -17,6 +17,7 @@ using MySqlConnector; using Polly; using Xunit; +using System.Threading.Tasks; namespace Aspire.Hosting.MySql.Tests; @@ -576,26 +577,31 @@ public async Task MySql_WithPersistentLifetime_ReusesContainers(bool useMultiple var rns = app.Services.GetRequiredService(); var resourceEvent = await rns.WaitForResourceHealthyAsync("resource", cts.Token); - var mySqlId = GetContainerId(resourceEvent); + var mySqlId = await GetContainerIdAsync(rns, "resource", cts.Token); var mySqlId2 = ""; if (useMultipleInstances) { resourceEvent = await rns.WaitForResourceHealthyAsync("resource2", cts.Token); - mySqlId2 = GetContainerId(resourceEvent); + mySqlId2 = await GetContainerIdAsync(rns, "resource2", cts.Token); } resourceEvent = await rns.WaitForResourceHealthyAsync("phpmyadmin", cts.Token); - var phpMyAdminId = GetContainerId(resourceEvent); + var phpMyAdminId = await GetContainerIdAsync(rns, "phpmyadmin", cts.Token);; await app.StopAsync(cts.Token).WaitAsync(cts.Token); return [mySqlId, mySqlId2, phpMyAdminId]; } - static string? GetContainerId(ResourceEvent resourceEvent) + static async Task GetContainerIdAsync(ResourceNotificationService rns, string resourceName, CancellationToken cancellationToken) { + var resourceEvent = await rns.WaitForResourceAsync(resourceName, (evt) => + { + return evt.Snapshot.Properties.FirstOrDefault(x => x.Name == "container.id")?.Value != null; + }, cancellationToken); + return resourceEvent.Snapshot.Properties.FirstOrDefault(x => x.Name == "container.id")?.Value?.ToString(); } } From 65ef91cbbac671b8745474784c930c60a2173461 Mon Sep 17 00:00:00 2001 From: David Negstad Date: Thu, 22 May 2025 20:32:06 -0700 Subject: [PATCH 5/5] Remove stray using --- tests/Aspire.Hosting.MySql.Tests/MySqlFunctionalTests.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Aspire.Hosting.MySql.Tests/MySqlFunctionalTests.cs b/tests/Aspire.Hosting.MySql.Tests/MySqlFunctionalTests.cs index c5039cd9c26..414e9560600 100644 --- a/tests/Aspire.Hosting.MySql.Tests/MySqlFunctionalTests.cs +++ b/tests/Aspire.Hosting.MySql.Tests/MySqlFunctionalTests.cs @@ -17,7 +17,6 @@ using MySqlConnector; using Polly; using Xunit; -using System.Threading.Tasks; namespace Aspire.Hosting.MySql.Tests;