Skip to content
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
28 changes: 14 additions & 14 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.DeveloperControlPlane.darwin-amd64" Version="0.15.0">
<Dependency Name="Microsoft.DeveloperControlPlane.darwin-amd64" Version="0.15.1">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>d00e1c008aaa8cfae2f74d26f4152c9c24aabe47</Sha>
<Sha>24290648d8381494bf015e262662262990b40413</Sha>
</Dependency>
<Dependency Name="Microsoft.DeveloperControlPlane.darwin-arm64" Version="0.15.0">
<Dependency Name="Microsoft.DeveloperControlPlane.darwin-arm64" Version="0.15.1">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>d00e1c008aaa8cfae2f74d26f4152c9c24aabe47</Sha>
<Sha>24290648d8381494bf015e262662262990b40413</Sha>
</Dependency>
<Dependency Name="Microsoft.DeveloperControlPlane.linux-amd64" Version="0.15.0">
<Dependency Name="Microsoft.DeveloperControlPlane.linux-amd64" Version="0.15.1">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>d00e1c008aaa8cfae2f74d26f4152c9c24aabe47</Sha>
<Sha>24290648d8381494bf015e262662262990b40413</Sha>
</Dependency>
<Dependency Name="Microsoft.DeveloperControlPlane.linux-arm64" Version="0.15.0">
<Dependency Name="Microsoft.DeveloperControlPlane.linux-arm64" Version="0.15.1">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>d00e1c008aaa8cfae2f74d26f4152c9c24aabe47</Sha>
<Sha>24290648d8381494bf015e262662262990b40413</Sha>
</Dependency>
<Dependency Name="Microsoft.DeveloperControlPlane.windows-386" Version="0.15.0">
<Dependency Name="Microsoft.DeveloperControlPlane.windows-386" Version="0.15.1">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>d00e1c008aaa8cfae2f74d26f4152c9c24aabe47</Sha>
<Sha>24290648d8381494bf015e262662262990b40413</Sha>
</Dependency>
<Dependency Name="Microsoft.DeveloperControlPlane.windows-amd64" Version="0.15.0">
<Dependency Name="Microsoft.DeveloperControlPlane.windows-amd64" Version="0.15.1">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>d00e1c008aaa8cfae2f74d26f4152c9c24aabe47</Sha>
<Sha>24290648d8381494bf015e262662262990b40413</Sha>
</Dependency>
<Dependency Name="Microsoft.DeveloperControlPlane.windows-arm64" Version="0.15.0">
<Dependency Name="Microsoft.DeveloperControlPlane.windows-arm64" Version="0.15.1">
<Uri>https://github.com/microsoft/usvc-apiserver</Uri>
<Sha>d00e1c008aaa8cfae2f74d26f4152c9c24aabe47</Sha>
<Sha>24290648d8381494bf015e262662262990b40413</Sha>
</Dependency>
<Dependency Name="Microsoft.Extensions.Http.Resilience" Version="9.4.0">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-extensions</Uri>
Expand Down
14 changes: 7 additions & 7 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
<!-- Package versions defined directly in <reporoot>/Directory.Packages.props -->
<MicrosoftDotnetSdkInternalVersion>8.0.100-rtm.23512.16</MicrosoftDotnetSdkInternalVersion>
<!-- DCP -->
<MicrosoftDeveloperControlPlanedarwinamd64Version>0.15.0</MicrosoftDeveloperControlPlanedarwinamd64Version>
<MicrosoftDeveloperControlPlanedarwinarm64Version>0.15.0</MicrosoftDeveloperControlPlanedarwinarm64Version>
<MicrosoftDeveloperControlPlanelinuxamd64Version>0.15.0</MicrosoftDeveloperControlPlanelinuxamd64Version>
<MicrosoftDeveloperControlPlanelinuxarm64Version>0.15.0</MicrosoftDeveloperControlPlanelinuxarm64Version>
<MicrosoftDeveloperControlPlanewindows386Version>0.15.0</MicrosoftDeveloperControlPlanewindows386Version>
<MicrosoftDeveloperControlPlanewindowsamd64Version>0.15.0</MicrosoftDeveloperControlPlanewindowsamd64Version>
<MicrosoftDeveloperControlPlanewindowsarm64Version>0.15.0</MicrosoftDeveloperControlPlanewindowsarm64Version>
<MicrosoftDeveloperControlPlanedarwinamd64Version>0.15.1</MicrosoftDeveloperControlPlanedarwinamd64Version>
<MicrosoftDeveloperControlPlanedarwinarm64Version>0.15.1</MicrosoftDeveloperControlPlanedarwinarm64Version>
<MicrosoftDeveloperControlPlanelinuxamd64Version>0.15.1</MicrosoftDeveloperControlPlanelinuxamd64Version>
<MicrosoftDeveloperControlPlanelinuxarm64Version>0.15.1</MicrosoftDeveloperControlPlanelinuxarm64Version>
<MicrosoftDeveloperControlPlanewindows386Version>0.15.1</MicrosoftDeveloperControlPlanewindows386Version>
<MicrosoftDeveloperControlPlanewindowsamd64Version>0.15.1</MicrosoftDeveloperControlPlanewindowsamd64Version>
<MicrosoftDeveloperControlPlanewindowsarm64Version>0.15.1</MicrosoftDeveloperControlPlanewindowsarm64Version>
<!-- Other -->
<MicrosoftDotNetRemoteExecutorVersion>9.0.0-beta.25225.6</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetXUnitV3ExtensionsVersion>10.0.0-beta.25178.1</MicrosoftDotNetXUnitV3ExtensionsVersion>
Expand Down
6 changes: 4 additions & 2 deletions src/Aspire.Hosting.Garnet/GarnetBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static IResourceBuilder<GarnetResource> 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);
Expand Down Expand Up @@ -140,7 +140,9 @@ public static IResourceBuilder<GarnetResource> AddGarnet(this IDistributedApplic
{
var garnetCommand = new List<string>
{
"/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)
Expand Down
6 changes: 3 additions & 3 deletions tests/Aspire.Hosting.Garnet.Tests/AddGarnetTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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}"
Expand Down Expand Up @@ -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}"
Expand Down
13 changes: 9 additions & 4 deletions tests/Aspire.Hosting.MySql.Tests/MySqlFunctionalTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -576,26 +576,31 @@ public async Task MySql_WithPersistentLifetime_ReusesContainers(bool useMultiple
var rns = app.Services.GetRequiredService<ResourceNotificationService>();

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<string?> 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();
}
}
Expand Down