Skip to content

Conversation

@aaronpowell
Copy link
Member

  • Updated multiple test files to replace calls to GetEnvironmentVariableValuesAsync() with GetEnvironmentVariablesAsync().
  • Replaced calls to GetArgumentValuesAsync() with GetArgumentListAsync() in various test cases.
  • Introduced new utility methods in the CommunityToolkit.Aspire.Testing namespace for better argument and environment variable handling.

Closes #<ISSUE_NUMBER>

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

… methods

- Updated multiple test files to replace calls to GetEnvironmentVariableValuesAsync() with GetEnvironmentVariablesAsync().
- Replaced calls to GetArgumentValuesAsync() with GetArgumentListAsync() in various test cases.
- Introduced new utility methods in the CommunityToolkit.Aspire.Testing namespace for better argument and environment variable handling.
aaronpowell and others added 5 commits December 14, 2025 22:48
Updated infrastructure and test code to use Azure Redis Enterprise (Microsoft.Cache/redisEnterprise) instead of the legacy Azure Redis Cache. Refactored connection string handling and key retrieval to use RedisEnterpriseCluster and RedisEnterpriseDatabase resources. Updated Bicep templates and test assertions accordingly. Removed obsolete test for non-SSL port, as Redis Enterprise always requires TLS. This modernizes the codebase to align with current Azure recommendations.
@github-actions github-actions bot added the Stale label Dec 21, 2025
@github-actions github-actions bot closed this Dec 24, 2025
@aaronpowell aaronpowell removed the Stale label Jan 12, 2026
@aaronpowell aaronpowell reopened this Jan 12, 2026
@aaronpowell aaronpowell marked this pull request as ready for review January 12, 2026 03:38
Copilot AI review requested due to automatic review settings January 12, 2026 03:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates the Aspire Community Toolkit to use .NET Aspire 13.1.0, introducing new testing utilities and migrating from Azure Redis Cache to Azure Managed Redis Enterprise.

Changes:

  • Upgraded Aspire SDK from 13.0.0 to 13.1.0 across all project files
  • Introduced utility methods GetEnvironmentVariablesAsync() and GetArgumentListAsync() in the CommunityToolkit.Aspire.Testing namespace to simplify test code
  • Migrated Azure Dapr Redis integration from Azure Redis Cache to Azure Managed Redis Enterprise

Reviewed changes

Copilot reviewed 75 out of 75 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/CommunityToolkit.Aspire.Testing/EnvironmentVariableEvaluator.cs New utility class for evaluating environment variables in tests
tests/CommunityToolkit.Aspire.Testing/ArgumentEvaluator.cs New utility class for evaluating command-line arguments in tests
tests/CommunityToolkit.Aspire.Testing/CommunityToolkit.Aspire.Testing.csproj Updated Aspire SDK version to 13.1.0
Multiple test files Replaced direct calls with new utility methods for cleaner test code
tests/CommunityToolkit.Aspire.Hosting.Keycloak.Extensions.Tests/*.cs Updated to manually process environment callback annotations instead of using utility methods
src/CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis/AzureRedisCacheDaprHostingExtensions.cs Migrated from Azure Redis Cache to Azure Managed Redis Enterprise with updated resource types and connection handling
tests/CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis.Tests/ResourceCreationTests.cs Updated tests to reflect Redis Enterprise migration and removed obsolete TLS test
Directory.Build.props Updated Aspire version to 13.1.0 and other dependency versions
Directory.Packages.props Fixed Keycloak package version format and updated OllamaSharp version
nuget.config Added dotnet9 package source
All example AppHost .csproj files Updated Aspire.AppHost.Sdk version to 13.1.0
examples/dapr/CommunityToolkit.Aspire.Hosting.Azure.Dapr.AppHost/Program.cs Updated to use AddAzureManagedRedis instead of AddAzureRedis
.github/agents/hosting-integration-creator.agent.md Formatting improvements for list items
Comments suppressed due to low confidence (1)

tests/CommunityToolkit.Aspire.Hosting.Azure.Dapr.Tests/AzureDaprPublishingHelperTests.cs:53

  • This assignment to redisState is useless, since its value is never read.

Comment on lines +11 to +14
public static async ValueTask<Dictionary<string, string>> GetEnvironmentVariablesAsync(
this IResource resource,
DistributedApplicationOperation applicationOperation = DistributedApplicationOperation.Run,
IServiceProvider? serviceProvider = null)
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The public method GetEnvironmentVariablesAsync is missing XML documentation comments. According to the project's coding guidelines, all public members require XML doc comments.

Copilot uses AI. Check for mistakes.

public static class ArgumentEvaluator
{
public static async ValueTask<List<string>> GetArgumentListAsync(this IResource resource, IServiceProvider? serviceProvider = null)
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The public method GetArgumentListAsync is missing XML documentation comments. According to the project's coding guidelines, all public members require XML doc comments.

Copilot uses AI. Check for mistakes.
var env = context.EnvironmentVariables;

Assert.Equal("postgres", env["KC_DB"]);
Assert.True(env.ContainsKey("KC_DB_URL"));
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inefficient use of 'ContainsKey' and indexer.

Copilot uses AI. Check for mistakes.
redisBuilder.ConfigureInfrastructure(infrastructure =>
{
var redisResource = infrastructure.GetProvisionableResources().OfType<AzureRedisResource>().SingleOrDefault();
var redisDatabase = infrastructure.GetProvisionableResources().OfType<RedisEnterpriseDatabase>().SingleOrDefault();
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assignment to redisDatabase is useless, since its value is never read.

Copilot uses AI. Check for mistakes.
using var builder = TestDistributedApplicationBuilder.Create(DistributedApplicationOperation.Publish);

var redisState = builder.AddAzureRedis("redisState").RunAsContainer();
var redisState = builder.AddAzureManagedRedis("redisState").RunAsContainer();
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assignment to redisState is useless, since its value is never read.

This issue also appears in the following locations of the same file:

  • line 53

Copilot uses AI. Check for mistakes.
This is from discussion with @FullStackChef as the test could be indicating something underlying but we can't figure out what so making the packages 'not stable' as a warning to users
@github-actions
Copy link
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
CommunityToolkit.Aspire.GoFeatureFlag 100% 97% 74
CommunityToolkit.Aspire.Hosting.ActiveMQ 78% 40% 108
CommunityToolkit.Aspire.Hosting.ActiveMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.Adminer 74% 50% 20
CommunityToolkit.Aspire.Hosting.Azure.Dapr 29% 7% 124
CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis 62% 38% 80
CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder 100% 100% 22
CommunityToolkit.Aspire.Hosting.Bun 96% 83% 28
CommunityToolkit.Aspire.Hosting.Dapr 60% 37% 856
CommunityToolkit.Aspire.Hosting.DbGate 94% 50% 18
CommunityToolkit.Aspire.Hosting.Deno 98% 85% 44
CommunityToolkit.Aspire.Hosting.Flagd 79% 100% 32
CommunityToolkit.Aspire.Hosting.GoFeatureFlag 88% 73% 36
CommunityToolkit.Aspire.Hosting.Golang 51% 40% 88
CommunityToolkit.Aspire.Hosting.Java 70% 75% 130
CommunityToolkit.Aspire.Hosting.JavaScript.Extensions 97% 85% 200
CommunityToolkit.Aspire.Hosting.k6 58% 12% 20
CommunityToolkit.Aspire.Hosting.Keycloak.Extensions 100% 100% 22
CommunityToolkit.Aspire.Hosting.KurrentDB 71% 75% 34
CommunityToolkit.Aspire.Hosting.LavinMQ 74% 50% 26
CommunityToolkit.Aspire.Hosting.LavinMQ.MassTransit 1% 0% 14
CommunityToolkit.Aspire.Hosting.MailPit 85% 50% 22
CommunityToolkit.Aspire.Hosting.McpInspector 78% 45% 210
CommunityToolkit.Aspire.Hosting.Meilisearch 71% 57% 58
CommunityToolkit.Aspire.Hosting.Minio 88% 75% 56
CommunityToolkit.Aspire.Hosting.MongoDB.Extensions 95% 90% 20
CommunityToolkit.Aspire.Hosting.MySql.Extensions 98% 92% 62
CommunityToolkit.Aspire.Hosting.Ngrok 52% 35% 82
CommunityToolkit.Aspire.Hosting.Ollama 65% 69% 260
CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector 78% 61% 77
CommunityToolkit.Aspire.Hosting.PapercutSmtp 81% 50% 18
CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions 97% 90% 68
CommunityToolkit.Aspire.Hosting.Python.Extensions 45% 29% 100
CommunityToolkit.Aspire.Hosting.RavenDB 62% 48% 148
CommunityToolkit.Aspire.Hosting.Redis.Extensions 100% 71% 28
CommunityToolkit.Aspire.Hosting.Rust 94% 83% 16
CommunityToolkit.Aspire.Hosting.Solr 72% 100% 22
CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects 51% 48% 192
CommunityToolkit.Aspire.Hosting.Sqlite 89% 89% 52
CommunityToolkit.Aspire.Hosting.SqlServer.Extensions 98% 90% 62
CommunityToolkit.Aspire.Hosting.Stripe 51% 30% 82
CommunityToolkit.Aspire.Hosting.SurrealDb 55% 40% 256
CommunityToolkit.Aspire.KurrentDB 94% 92% 54
CommunityToolkit.Aspire.MassTransit.RabbitMQ 100% 100% 30
CommunityToolkit.Aspire.Meilisearch 97% 92% 68
CommunityToolkit.Aspire.Microsoft.Data.Sqlite 89% 85% 52
CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite 61% 58% 114
CommunityToolkit.Aspire.Minio.Client 90% 85% 112
CommunityToolkit.Aspire.OllamaSharp 78% 71% 134
CommunityToolkit.Aspire.RavenDB.Client 60% 53% 237
CommunityToolkit.Aspire.SurrealDb 79% 63% 78
Summary 67% (7452 / 11076) 55% (2053 / 3734) 4760

Minimum allowed line rate is 60%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants