Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7efe0a9
baseline branch for the next major release
aaronpowell Oct 22, 2025
263500f
Initial plan
Copilot Oct 22, 2025
456ec42
Implement GetConnectionProperties for all IResourceWithConnectionStri…
Copilot Oct 22, 2025
2ebfea3
Updating nightly
aaronpowell Oct 23, 2025
06d5985
Remove deprecated IDistributedApplicationLifecycleHook interface (#915)
Copilot Oct 24, 2025
1cac8f7
Merge branch 'aspire-13' into copilot/adapt-connection-string-formatting
aaronpowell Oct 24, 2025
3998714
Merge branch 'main' into aspire-13
aaronpowell Oct 24, 2025
8854f05
Adjusting the version of keycloak
aaronpowell Oct 24, 2025
e347742
Merge branch 'aspire-13' into copilot/adapt-connection-string-formatting
aaronpowell Oct 24, 2025
8ed05c2
Updating aspire nightly
aaronpowell Oct 24, 2025
021a7ae
Merge branch 'main' into aspire-13
aaronpowell Oct 27, 2025
573fa53
New nightly
aaronpowell Oct 27, 2025
f20ff5b
Handling url encoding
aaronpowell Oct 27, 2025
beff6c8
Merge branch 'aspire-13' into copilot/adapt-connection-string-formatting
aaronpowell Oct 27, 2025
18787c3
Remove npm functionality moved to Aspire 13 (#928)
Copilot Nov 3, 2025
b8f82f3
Merge branch 'aspire-13' into copilot/adapt-connection-string-formatting
aaronpowell Nov 3, 2025
eef3b5c
Merge branch 'main' into aspire-13
aaronpowell Nov 3, 2025
7c3b2aa
Merge branch 'aspire-13' of https://github.com/CommunityToolkit/Aspir…
aaronpowell Nov 4, 2025
747ee02
Merge branch 'aspire-13' into copilot/adapt-connection-string-formatting
aaronpowell Nov 4, 2025
76cfd8e
Fixing failing test
aaronpowell Nov 4, 2025
5352dc5
Merge branch 'aspire-13' into copilot/adapt-connection-string-formatting
aaronpowell Nov 4, 2025
f592c54
Merge branch 'main' into aspire-13
aaronpowell Nov 4, 2025
9dd878d
Add GetConnectionProperties implementation to MinioContainerResource
Copilot Nov 4, 2025
750eeb7
Add GetConnectionProperties to KurrentDB and LavinMQ resources
Copilot Nov 4, 2025
fbf5bd7
Handling uri encoding which requires a reference expression wrapper
aaronpowell Nov 4, 2025
acf869e
Don't need to escape in the connection string as we now encode properly
aaronpowell Nov 4, 2025
92071f1
Merge branch 'aspire-13' into copilot/adapt-connection-string-formatting
aaronpowell Nov 4, 2025
9d6a637
Merge branch 'main' into copilot/adapt-connection-string-formatting
aaronpowell Nov 11, 2025
6e33779
Reverting some changes that weren't needed
aaronpowell Nov 11, 2025
6cb9b79
Fixing minio encoding in tests
aaronpowell Nov 11, 2025
986ba62
Removing URL encoding as the client doesn't decode it
aaronpowell Nov 11, 2025
e732a27
forgot to revert some changes in tests
aaronpowell Nov 11, 2025
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
11 changes: 6 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<AspireMajorVersion>9</AspireMajorVersion>
<AspireVersion>$(AspireMajorVersion).5.0</AspireVersion>
<AspireMajorVersion>13</AspireMajorVersion>
<AspireVersion>$(AspireMajorVersion).0.0-preview.1.25521.5</AspireVersion>
<AspireAppHostSdkVersion>$(AspireVersion)</AspireAppHostSdkVersion>
<AspNetCoreVersion>9.0.0</AspNetCoreVersion>
<DotNetExtensionsVersion>9.0.9</DotNetExtensionsVersion>
<DotNetExtensionsVersion>9.0.10</DotNetExtensionsVersion>
<OpenTelemetryVersion>1.12.0</OpenTelemetryVersion>
<TestContainersVersion>4.7.0</TestContainersVersion>
<MEAIVersion>9.9.0</MEAIVersion>
<ServiceDiscoveryVersion>10.0.0-preview.1.25520.3</ServiceDiscoveryVersion>
<IsPackable>false</IsPackable>

<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
Expand All @@ -37,8 +38,8 @@

<!-- Versioning -->
<PropertyGroup>
<ToolkitMinorVersion>8</ToolkitMinorVersion>
<ToolkitPatchVersion>1</ToolkitPatchVersion>
<ToolkitMinorVersion>0</ToolkitMinorVersion>
<ToolkitPatchVersion>0</ToolkitPatchVersion>
<ToolkitPreviewVersion>preview.1</ToolkitPreviewVersion>

<VersionPrefix>$(AspireMajorVersion).$(ToolkitMinorVersion).$(ToolkitPatchVersion)</VersionPrefix>
Expand Down
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.7" />
<!-- .NET packages -->
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="9.9.0" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="$(AspireVersion)" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="$(ServiceDiscoveryVersion)" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="$(DotNetExtensionsVersion)" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="$(DotNetExtensionsVersion)" />
Expand Down Expand Up @@ -112,7 +112,7 @@
<PackageVersion Include="Testcontainers.MsSql" Version="$(TestContainersVersion)" />
</ItemGroup>
<ItemGroup Label=".NET 9 Overrides" Condition="'$(TargetFramework)' == 'net9.0'">
<PackageVersion Update="Microsoft.Extensions.Logging.Abstractions" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.9" />
<PackageVersion Update="Microsoft.Extensions.Logging.Abstractions" Version="9.0.10" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.10" />
</ItemGroup>
</Project>
8 changes: 7 additions & 1 deletion nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet9-transport" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
<add key="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json">
<package pattern="Aspire*" />
<package pattern="Microsoft.Extensions.ServiceDiscovery*" />
</packageSource>
<packageSource key="dotnet-eng">
<package pattern="Microsoft.DotNet.XUnitExtensions" />
</packageSource>
<packageSource key="dotnet9-transport">
<package pattern="Microsoft.DotNet.GenAPI.Task" />
<package pattern="*" />
</packageSource>
<packageSource key="nuget">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ public abstract class ActiveMQServerResourceBase(string name, ParameterResource?
/// </summary>
public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new EndpointReference(this, PrimaryEndpointName);

/// <summary>
/// Gets the host endpoint reference for this resource.
/// </summary>
public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host);

/// <summary>
/// Gets the port endpoint reference for this resource.
/// </summary>
public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);

/// <summary>
/// Gets the parameter that contains the ActiveMQ server username.
/// </summary>
Expand All @@ -49,6 +59,23 @@ public abstract class ActiveMQServerResourceBase(string name, ParameterResource?
UserNameParameter is not null ?
ReferenceExpression.Create($"{UserNameParameter}") :
ReferenceExpression.Create($"{DefaultUserName}");

/// <summary>
/// Gets the connection URI expression for the ActiveMQ server.
/// </summary>
/// <remarks>
/// Format: <c>{scheme}://{user}:{password}@{host}:{port}</c>.
/// </remarks>
public ReferenceExpression UriExpression => ConnectionStringExpression;

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties()
{
yield return new("Host", ReferenceExpression.Create($"{Host}"));
yield return new("Port", ReferenceExpression.Create($"{Port}"));
yield return new("Username", UserNameReference);
yield return new("Password", ReferenceExpression.Create($"{PasswordParameter}"));
yield return new("Uri", UriExpression);
}

private static T ThrowIfNull<T>([NotNull] T? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
=> argument ?? throw new ArgumentNullException(paramName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,35 @@ public class EventStoreResource(string name) : ContainerResource(name), IResourc
/// </summary>
public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, HttpEndpointName);

/// <summary>
/// Gets the host endpoint reference for this resource.
/// </summary>
public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host);

/// <summary>
/// Gets the port endpoint reference for this resource.
/// </summary>
public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);

/// <summary>
/// Gets the connection string for the EventStore server.
/// </summary>
public ReferenceExpression ConnectionStringExpression =>
ReferenceExpression.Create(
$"esdb://{PrimaryEndpoint.Property(EndpointProperty.Host)}:{PrimaryEndpoint.Property(EndpointProperty.Port)}?tls=false");

/// <summary>
/// Gets the connection URI expression for the EventStore server.
/// </summary>
/// <remarks>
/// Format: <c>esdb://{host}:{port}?tls=false</c>.
/// </remarks>
public ReferenceExpression UriExpression => ConnectionStringExpression;

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties()
{
yield return new("Host", ReferenceExpression.Create($"{Host}"));
yield return new("Port", ReferenceExpression.Create($"{Port}"));
yield return new("Uri", UriExpression);
}
}
25 changes: 25 additions & 0 deletions src/CommunityToolkit.Aspire.Hosting.Flagd/FlagdResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ public class FlagdResource(string name) : ContainerResource(name), IResourceWith
/// </summary>
public EndpointReference PrimaryEndpoint => _primaryEndpointReference ??= new(this, HttpEndpointName);

/// <summary>
/// Gets the host endpoint reference for this resource.
/// </summary>
public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host);

/// <summary>
/// Gets the port endpoint reference for this resource.
/// </summary>
public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);

/// <summary>
/// Gets the health check HTTP endpoint for the flagd server.
/// </summary>
Expand All @@ -41,4 +51,19 @@ public class FlagdResource(string name) : ContainerResource(name), IResourceWith
ReferenceExpression.Create(
$"{PrimaryEndpoint.Property(EndpointProperty.Scheme)}://{PrimaryEndpoint.Property(EndpointProperty.Host)}:{PrimaryEndpoint.Property(EndpointProperty.Port)}"
);

/// <summary>
/// Gets the connection URI expression for the flagd server.
/// </summary>
/// <remarks>
/// Format: <c>http://{host}:{port}</c>.
/// </remarks>
public ReferenceExpression UriExpression => ConnectionStringExpression;

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties()
{
yield return new("Host", ReferenceExpression.Create($"{Host}"));
yield return new("Port", ReferenceExpression.Create($"{Port}"));
yield return new("Uri", UriExpression);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,34 @@ public class GoFeatureFlagResource(string name) : ContainerResource(name), IReso
/// </summary>
public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);

/// <summary>
/// Gets the host endpoint reference for this resource.
/// </summary>
public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host);

/// <summary>
/// Gets the port endpoint reference for this resource.
/// </summary>
public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);

/// <summary>
/// Gets the connection string expression for the GO Feature Flag instance.
/// </summary>
public ReferenceExpression ConnectionStringExpression =>
ReferenceExpression.Create($"Endpoint=http://{PrimaryEndpoint.Property(EndpointProperty.Host)}:{PrimaryEndpoint.Property(EndpointProperty.Port)}");

/// <summary>
/// Gets the connection URI expression for the GO Feature Flag instance.
/// </summary>
/// <remarks>
/// Format: <c>http://{host}:{port}</c>.
/// </remarks>
public ReferenceExpression UriExpression => ReferenceExpression.Create($"http://{Host}:{Port}");

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties()
{
yield return new("Host", ReferenceExpression.Create($"{Host}"));
yield return new("Port", ReferenceExpression.Create($"{Port}"));
yield return new("Uri", UriExpression);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,34 @@ public class MailPitContainerResource(string name) : ContainerResource(name), IR
private EndpointReference? _smtpEndpoint;
private EndpointReference SmtpEndpoint => _smtpEndpoint ??= new EndpointReference(this, SmtpEndpointName);

/// <summary>
/// Gets the host endpoint reference for the SMTP endpoint.
/// </summary>
public EndpointReferenceExpression Host => SmtpEndpoint.Property(EndpointProperty.Host);

/// <summary>
/// Gets the port endpoint reference for the SMTP endpoint.
/// </summary>
public EndpointReferenceExpression Port => SmtpEndpoint.Property(EndpointProperty.Port);

/// <summary>
/// ConnectionString for MailPit smtp endpoint in the form of smtp://host:port.
/// </summary>
public ReferenceExpression ConnectionStringExpression => ReferenceExpression.Create(
$"Endpoint={SmtpEndpoint.Scheme}://{SmtpEndpoint.Property(EndpointProperty.Host)}:{SmtpEndpoint.Property(EndpointProperty.Port)}");

/// <summary>
/// Gets the connection URI expression for the MailPit SMTP endpoint.
/// </summary>
/// <remarks>
/// Format: <c>smtp://{host}:{port}</c>.
/// </remarks>
public ReferenceExpression UriExpression => ReferenceExpression.Create($"{SmtpEndpoint.Scheme}://{Host}:{Port}");

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties()
{
yield return new("Host", ReferenceExpression.Create($"{Host}"));
yield return new("Port", ReferenceExpression.Create($"{Port}"));
yield return new("Uri", UriExpression);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ public MeilisearchResource(string name, ParameterResource masterKey) : base(name
/// </summary>
public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);

/// <summary>
/// Gets the host endpoint reference for this resource.
/// </summary>
public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host);

/// <summary>
/// Gets the port endpoint reference for this resource.
/// </summary>
public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);

/// <summary>
/// Gets the parameter that contains the Meilisearch superuser password.
/// </summary>
Expand All @@ -32,5 +42,21 @@ public MeilisearchResource(string name, ParameterResource masterKey) : base(name
/// </summary>
public ReferenceExpression ConnectionStringExpression =>
ReferenceExpression.Create($"Endpoint=http://{PrimaryEndpoint.Property(EndpointProperty.Host)}:{PrimaryEndpoint.Property(EndpointProperty.Port)};MasterKey={MasterKeyParameter}");

/// <summary>
/// Gets the connection URI expression for the Meilisearch server.
/// </summary>
/// <remarks>
/// Format: <c>http://{host}:{port}</c>.
/// </remarks>
public ReferenceExpression UriExpression => ReferenceExpression.Create($"http://{Host}:{Port}");

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties()
{
yield return new("Host", ReferenceExpression.Create($"{Host}"));
yield return new("Port", ReferenceExpression.Create($"{Port}"));
yield return new("MasterKey", ReferenceExpression.Create($"{MasterKeyParameter}"));
yield return new("Uri", UriExpression);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public class OllamaModelResource(string name, string modelName, OllamaResource p
/// </summary>
public string ModelName { get; } = ThrowIfNull(modelName);

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties() =>
Parent.CombineProperties([
new("Model", ReferenceExpression.Create($"{ModelName}"))
]);

private static T ThrowIfNull<T>([NotNull] T? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
=> argument ?? throw new ArgumentNullException(paramName);
}
25 changes: 25 additions & 0 deletions src/CommunityToolkit.Aspire.Hosting.Ollama/OllamaResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ public class OllamaResource(string name) : ContainerResource(name), IResourceWit
/// </summary>
public EndpointReference PrimaryEndpoint => _primaryEndpointReference ??= new(this, OllamaEndpointName);

/// <summary>
/// Gets the host endpoint reference for this resource.
/// </summary>
public EndpointReferenceExpression Host => PrimaryEndpoint.Property(EndpointProperty.Host);

/// <summary>
/// Gets the port endpoint reference for this resource.
/// </summary>
public EndpointReferenceExpression Port => PrimaryEndpoint.Property(EndpointProperty.Port);

/// <summary>
/// Gets the connection string expression for the Ollama server.
/// </summary>
Expand All @@ -35,6 +45,14 @@ public class OllamaResource(string name) : ContainerResource(name), IResourceWit
$"Endpoint={PrimaryEndpoint.Property(EndpointProperty.Scheme)}://{PrimaryEndpoint.Property(EndpointProperty.Host)}:{PrimaryEndpoint.Property(EndpointProperty.Port)}"
);

/// <summary>
/// Gets the connection URI expression for the Ollama server.
/// </summary>
/// <remarks>
/// Format: <c>http://{host}:{port}</c>.
/// </remarks>
public ReferenceExpression UriExpression => ReferenceExpression.Create($"{PrimaryEndpoint.Property(EndpointProperty.Scheme)}://{Host}:{Port}");

/// <summary>
/// Adds a model to the list of models to download on initial startup.
/// </summary>
Expand All @@ -47,4 +65,11 @@ public void AddModel(string modelName)
_models.Add(modelName);
}
}

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties()
{
yield return new("Host", ReferenceExpression.Create($"{Host}"));
yield return new("Port", ReferenceExpression.Create($"{Port}"));
yield return new("Uri", UriExpression);
}
}
Loading