Skip to content

Commit fb0d44b

Browse files
Updating to 9.5 pre-release (#868)
* Updating to 9.5 pre-release * Fixing dapr tests * Using aspire version for Microsoft.Extensions.ServiceDiscovery * Add icons to the otel collector & dev cert export (#870) * Removing some legacy swa stuff * Updating OllamaSharp * Some additional version updates * Removing the pre-release nuget feed --------- Co-authored-by: Alex Crome <afscrome@users.noreply.github.com>
1 parent 824794a commit fb0d44b

File tree

7 files changed

+71
-74
lines changed

7 files changed

+71
-74
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": ".NET Aspire Community Toolkit",
3-
"image": "mcr.microsoft.com/devcontainers/dotnet:8.0-jammy",
3+
"image": "mcr.microsoft.com/devcontainers/dotnet:8.0-noble",
44
"features": {
55
"ghcr.io/azure/azure-dev/azd:latest": {},
66
"ghcr.io/devcontainers/features/dotnet:latest": {
@@ -43,11 +43,5 @@
4343
"postCreateCommand": "./.devcontainer/post-create.sh > ~/post-create.log",
4444
"hostRequirements": {
4545
"memory": "8gb"
46-
},
47-
"portsAttributes": {
48-
"4280": {
49-
"label": "SWA Emulator",
50-
"onAutoForward": "notify"
51-
}
5246
}
53-
}
47+
}

Directory.Build.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
<Nullable>enable</Nullable>
1313

1414
<AspireMajorVersion>9</AspireMajorVersion>
15-
<AspireVersion>$(AspireMajorVersion).4.1</AspireVersion>
15+
<AspireVersion>$(AspireMajorVersion).5.0</AspireVersion>
1616
<AspireAppHostSdkVersion>$(AspireVersion)</AspireAppHostSdkVersion>
1717
<AspNetCoreVersion>9.0.0</AspNetCoreVersion>
18-
<DotNetExtensionsVersion>9.0.4</DotNetExtensionsVersion>
18+
<DotNetExtensionsVersion>9.0.9</DotNetExtensionsVersion>
1919
<OpenTelemetryVersion>1.12.0</OpenTelemetryVersion>
20-
<TestContainersVersion>4.4.0</TestContainersVersion>
21-
<MEAIVersion>9.5.0</MEAIVersion>
20+
<TestContainersVersion>4.7.0</TestContainersVersion>
21+
<MEAIVersion>9.9.0</MEAIVersion>
2222
<IsPackable>false</IsPackable>
2323

2424
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>

Directory.Packages.props

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
<PackageVersion Include="Dapr.AspNetCore" Version="1.15.3" />
3232
<PackageVersion Include="Dapr.Client" Version="1.15.3" />
3333
<PackageVersion Include="Microsoft.AspNetCore.Components.QuickGrid" Version="$(AspNetCoreVersion)" />
34-
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.15" />
34+
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.20" />
3535
<PackageVersion Include="Microsoft.DotNet.PlatformAbstractions" Version="3.1.6" />
36-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.4">
36+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.9">
3737
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3838
<PrivateAssets>all</PrivateAssets>
3939
</PackageVersion>
@@ -44,8 +44,8 @@
4444
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(DotNetExtensionsVersion)" />
4545
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.7" />
4646
<!-- .NET packages -->
47-
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="9.4.0" />
48-
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="9.1.0" />
47+
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="9.9.0" />
48+
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="$(AspireVersion)" />
4949
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="$(DotNetExtensionsVersion)" />
5050
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
5151
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="$(DotNetExtensionsVersion)" />
@@ -64,20 +64,20 @@
6464
<ItemGroup Label="Integration Packages">
6565
<!-- External packages -->
6666
<PackageVersion Include="Azure.Provisioning.AppContainers" Version="1.1.0" />
67-
<PackageVersion Include="JsonSchema.Net" Version="7.3.4" />
68-
<PackageVersion Include="OllamaSharp" Version="5.1.12" />
67+
<PackageVersion Include="JsonSchema.Net" Version="7.4.0" />
68+
<PackageVersion Include="OllamaSharp" Version="5.4.6" />
6969
<PackageVersion Include="OpenFeature.Contrib.GOFeatureFlag" Version="0.2.1" />
70-
<PackageVersion Include="Minio" Version="6.0.4" />
71-
<PackageVersion Include="MassTransit" Version="8.4.0" />
72-
<PackageVersion Include="MassTransit.ActiveMQ" Version="8.4.0" />
73-
<PackageVersion Include="MassTransit.RabbitMQ" Version="8.4.0" />
74-
<PackageVersion Include="MeiliSearch" Version="0.16.0" />
75-
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.3" />
76-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.4" />
77-
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.13" />
70+
<PackageVersion Include="Minio" Version="6.0.5" />
71+
<PackageVersion Include="MassTransit" Version="8.5.2" />
72+
<PackageVersion Include="MassTransit.ActiveMQ" Version="8.5.2" />
73+
<PackageVersion Include="MassTransit.RabbitMQ" Version="8.5.2" />
74+
<PackageVersion Include="MeiliSearch" Version="0.17.1" />
75+
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.9" />
76+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.9" />
77+
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.20" />
7878
<PackageVersion Include="Microsoft.SqlServer.DacFx" Version="170.1.61" />
79-
<PackageVersion Include="Microsoft.Build" Version="17.11.4" />
80-
<PackageVersion Include="Microsoft.Build.Locator" Version="1.7.8" />
79+
<PackageVersion Include="Microsoft.Build" Version="17.11.31" />
80+
<PackageVersion Include="Microsoft.Build.Locator" Version="1.9.1" />
8181
<PackageVersion Include="EventStore.Client.Extensions.OpenTelemetry" Version="23.3.8" />
8282
<PackageVersion Include="EventStore.Client.Grpc.Streams" Version="23.3.8" />
8383
<PackageVersion Include="ErikEJ.Dacpac.Chinook" Version="1.0.0" />
@@ -94,10 +94,10 @@
9494
<ItemGroup Label="Testing">
9595
<!-- Testing packages -->
9696
<PackageVersion Include="Aspire.Hosting.Testing" Version="$(AspireVersion)" />
97-
<PackageVersion Include="Bogus" Version="35.6.1" />
97+
<PackageVersion Include="Bogus" Version="35.6.3" />
9898
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
99-
<PackageVersion Include="MartinCostello.Logging.XUnit" Version="0.5.0" />
100-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
99+
<PackageVersion Include="MartinCostello.Logging.XUnit" Version="0.6.0" />
100+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
101101
<PackageVersion Include="xunit" Version="2.9.3" />
102102
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
103103
<PackageVersion Include="xunit.extensibility.execution" Version="2.9.3" />
@@ -110,7 +110,7 @@
110110
<PackageVersion Include="Testcontainers.MsSql" Version="$(TestContainersVersion)" />
111111
</ItemGroup>
112112
<ItemGroup Label=".NET 9 Overrides" Condition="'$(TargetFramework)' == 'net9.0'">
113-
<PackageVersion Update="Microsoft.Extensions.Logging.Abstractions" Version="9.0.7" />
114-
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.7" />
113+
<PackageVersion Update="Microsoft.Extensions.Logging.Abstractions" Version="9.0.9" />
114+
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.9" />
115115
</ItemGroup>
116116
</Project>

nuget.config

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
44
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
55
<clear />
66
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
77
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
88
<add key="dotnet9-transport" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet9-transport/nuget/v3/index.json" />
9-
<!-- <add key="dotnet9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json" /> -->
109
</packageSources>
1110
<packageSourceMapping>
12-
<!-- <packageSource key="dotnet9">
13-
<package pattern="Aspire.*" />
14-
<package pattern="Microsoft.Extensions.ServiceDiscovery*" />
15-
<package pattern="Microsoft.Extensions.Http.Resilience" />
16-
</packageSource> -->
1711
<packageSource key="dotnet-eng">
1812
<package pattern="Microsoft.DotNet.XUnitExtensions" />
1913
</packageSource>

src/CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector/OpenTelemetryCollectorExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public static IResourceBuilder<OpenTelemetryCollectorResource> AddOpenTelemetryC
4040
var resourceBuilder = builder.AddResource(resource)
4141
.WithImage(settings.CollectorImage, settings.CollectorTag)
4242
.WithEnvironment("ASPIRE_ENDPOINT", new HostUrl(url))
43-
.WithEnvironment("ASPIRE_API_KEY", builder.Configuration[DashboardOtlpApiKeyVariableName]);
43+
.WithEnvironment("ASPIRE_API_KEY", builder.Configuration[DashboardOtlpApiKeyVariableName])
44+
.WithIconName("DesktopPulse");
4445

4546
if (settings.EnableGrpcEndpoint)
4647
resourceBuilder.WithEndpoint(targetPort: 4317, name: OpenTelemetryCollectorResource.GrpcEndpointName, scheme: isHttpsEnabled ? "https" : "http");

src/Shared/DevCertHostingExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public static IResourceBuilder<TResource> RunWithHttpsDevCertificate<TResource>(
6464
exportExecutable = builder.ApplicationBuilder
6565
.AddExecutable(exportResourceName, "dotnet", tempDir.FullName)
6666
.WithEnvironment("DOTNET_CLI_UI_LANGUAGE", "en") // Ensure consistent output language
67+
.WithIconName("Certificate")
6768
.WithArgs(context =>
6869
{
6970
context.Args.Add("dev-certs");

tests/CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis.Tests/ResourceCreationTests.cs

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ public void WithReference_WhenAADDisabled_UsesPasswordSecret()
3333

3434
// First check if there are any resources with the annotation
3535
Assert.NotEmpty(resourcesWithAnnotation);
36-
36+
3737
// Now check for a specific resource
38-
var daprStateStore = Assert.Single(appModel.Resources.OfType<IDaprComponentResource>(),
38+
var daprStateStore = Assert.Single(appModel.Resources.OfType<IDaprComponentResource>(),
3939
r => r.Name == "statestore");
40-
40+
4141
// Check there's an annotation on it
4242
Assert.Contains(daprStateStore.Annotations, a => a is AzureDaprComponentPublishingAnnotation);
4343

@@ -96,15 +96,15 @@ param redisstate_kv_outputs_name string
9696
// Get the actual bicep template and rearrange the ordering if needed
9797
var actualLines = redisBicep.Split(Environment.NewLine);
9898
var expectedLines = expectedRedisBicep.Split(Environment.NewLine);
99-
99+
100100
// Compare the Redis resource configuration which is what we actually care about
101-
var redisResourceSection = string.Join(Environment.NewLine,
102-
actualLines.Where(line => line.Contains("resource redisState") ||
103-
line.Contains("name:") ||
104-
line.Contains("sku:") ||
105-
line.Contains("family:") ||
101+
var redisResourceSection = string.Join(Environment.NewLine,
102+
actualLines.Where(line => line.Contains("resource redisState") ||
103+
line.Contains("name:") ||
104+
line.Contains("sku:") ||
105+
line.Contains("family:") ||
106106
line.Contains("capacity:")));
107-
107+
108108
Assert.Contains("'Microsoft.Cache/redis@2024-11-01'", redisResourceSection);
109109

110110
// Verify that resources with Dapr publishing annotations exist
@@ -133,11 +133,11 @@ public void WithReference_WhenAADEnabled_SkipsPasswordSecret()
133133

134134
// First check if there are any resources with the annotation
135135
Assert.NotEmpty(resourcesWithAnnotation);
136-
136+
137137
// Now check for a specific resource
138-
var daprStateStore = Assert.Single(appModel.Resources.OfType<IDaprComponentResource>(),
138+
var daprStateStore = Assert.Single(appModel.Resources.OfType<IDaprComponentResource>(),
139139
r => r.Name == "statestore");
140-
140+
141141
// Check there's an annotation on it
142142
Assert.Contains(daprStateStore.Annotations, a => a is AzureDaprComponentPublishingAnnotation);
143143

@@ -174,6 +174,8 @@ public void WithReference_WhenAADEnabled_SkipsPasswordSecret()
174174
175175
output name string = redisState.name
176176
177+
output hostName string = redisState.properties.hostName
178+
177179
output daprConnectionString string = '${redisState.properties.hostName}:${redisState.properties.sslPort}'
178180
""";
179181

@@ -210,11 +212,11 @@ public void WithReference_WhenTLSDisabled_UsesNonSslPort()
210212

211213
// First check if there are any resources with the annotation
212214
Assert.NotEmpty(resourcesWithAnnotation);
213-
215+
214216
// Now check for a specific resource
215-
var daprStateStore = Assert.Single(appModel.Resources.OfType<IDaprComponentResource>(),
217+
var daprStateStore = Assert.Single(appModel.Resources.OfType<IDaprComponentResource>(),
216218
r => r.Name == "statestore");
217-
219+
218220
// Check there's an annotation on it
219221
Assert.Contains(daprStateStore.Annotations, a => a is AzureDaprComponentPublishingAnnotation);
220222

@@ -252,6 +254,8 @@ public void WithReference_WhenTLSDisabled_UsesNonSslPort()
252254
253255
output name string = redisState.name
254256
257+
output hostName string = redisState.properties.hostName
258+
255259
output daprConnectionString string = '${redisState.properties.hostName}:${redisState.properties.port}'
256260
""";
257261

@@ -271,32 +275,34 @@ public void WithReference_WhenNonStateType_ThrowsException()
271275
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish);
272276

273277
var redisState = builder.AddAzureRedis("redisState").RunAsContainer();
274-
278+
275279
// The Redis connection should only be used with state store components
276-
var unknownComponent = builder.AddDaprComponent("unknown","component");
277-
280+
var unknownComponent = builder.AddDaprComponent("unknown", "component");
281+
278282
// Create an app with a sidecar that references the unknown component
279283
var appBuilder = builder.AddContainer("myapp", "image")
280-
.WithDaprSidecar(sidecar => {
284+
.WithDaprSidecar(sidecar =>
285+
{
281286
// Reference the unknown component first
282287
sidecar.WithReference(unknownComponent);
283288
});
284-
289+
285290
// Attempting to create a non-state store reference to Redis should throw
286-
var exception = Assert.Throws<InvalidOperationException>(() => {
291+
var exception = Assert.Throws<InvalidOperationException>(() =>
292+
{
287293
unknownComponent.WithReference(redisState);
288294
});
289-
295+
290296
// Verify the exception message contains information about the unsupported component type
291297
Assert.Contains("Unsupported Dapr component", exception.Message, StringComparison.OrdinalIgnoreCase);
292-
298+
293299
// Demonstrate the correct way to reference Redis
294300
var stateStore = builder.AddDaprStateStore("statestore");
295301
stateStore.WithReference(redisState); // This should work correctly
296-
302+
297303
using var app = builder.Build();
298304
}
299-
305+
300306
[Fact]
301307
public void PreferredPattern_ReferencingRedisStateComponent()
302308
{
@@ -306,31 +312,32 @@ public void PreferredPattern_ReferencingRedisStateComponent()
306312
// Add the Redis state and Dapr state store
307313
var redisState = builder.AddAzureRedis("redisState").RunAsContainer();
308314
var daprState = builder.AddDaprStateStore("statestore");
309-
315+
310316
// Add an app with a sidecar
311317
builder.AddContainer("myapp", "image")
312-
.WithDaprSidecar(sidecar => {
318+
.WithDaprSidecar(sidecar =>
319+
{
313320
// Reference both components through the sidecar
314321
sidecar.WithReference(daprState);
315322
// We can't directly reference Redis from the sidecar due to interface incompatibilities
316323
// This line would fail with a compile error: sidecar.WithReference(redisState);
317-
324+
318325
// We need to first create a Dapr component that references Redis
319326
var anotherState = builder.AddDaprStateStore("anotherstate");
320327
anotherState.WithReference(redisState);
321328
sidecar.WithReference(anotherState);
322329
});
323-
330+
324331
using var app = builder.Build();
325-
332+
326333
var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
327334
var sidecarResource = Assert.Single(appModel.Resources.OfType<IDaprSidecarResource>());
328-
335+
329336
// Check for component reference annotations
330337
var referenceAnnotations = sidecarResource.Annotations
331338
.OfType<DaprComponentReferenceAnnotation>()
332339
.ToList();
333-
340+
334341
Assert.Equal(2, referenceAnnotations.Count);
335342
}
336343
}

0 commit comments

Comments
 (0)