Skip to content

Complete polyglot exports for Aspire.Hosting.Redis#14946

Merged
sebastienros merged 3 commits intorelease/13.2from
sebros/polyglot-redis
Mar 4, 2026
Merged

Complete polyglot exports for Aspire.Hosting.Redis#14946
sebastienros merged 3 commits intorelease/13.2from
sebros/polyglot-redis

Conversation

@sebastienros
Copy link
Contributor

Related to #14069

Only the main method was exported, and no polyglot playground existed

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14946

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14946"

Removed sdkVersion and cleared Aspire.Hosting.Redis version.
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 PR completes the TypeScript/polyglot export surface for Aspire.Hosting.Redis by exporting additional Redis APIs/properties via [AspireExport] and adding a new TypeScript ValidationAppHost playground project to exercise the generated SDK.

Changes:

  • Export RedisResource properties for polyglot access (with an explicit ignore for ConnectionStringExpression).
  • Add missing [AspireExport] coverage for Redis Commander/Insight host-port configuration and Redis Insight storage helpers.
  • Add a new TypeScript ValidationAppHost (tsconfig, npm project files, generated .modules, and sample apphost.ts).

Reviewed changes

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

Show a summary per file
File Description
src/Aspire.Hosting.Redis/RedisResource.cs Exposes RedisResource properties to polyglot hosts and ignores ConnectionStringExpression.
src/Aspire.Hosting.Redis/RedisBuilderExtensions.cs Adds missing exports for Redis Commander/Insight port config, Redis Insight storage helpers, and Redis password config.
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/tsconfig.json TypeScript config for the new Redis ValidationAppHost.
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/package.json NPM project setup for the ValidationAppHost.
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/package-lock.json Locked dependencies for repeatable ValidationAppHost builds.
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/apphost.ts Validation script intended to exercise generated Redis SDK APIs.
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/apphost.run.json Run profile configuration for the ValidationAppHost.
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/.modules/transport.ts Generated ATS transport/runtime support for the ValidationAppHost.
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/.modules/base.ts Generated base types (ReferenceExpression, list/dict wrappers, etc.).
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/.modules/.codegen-hash Tracks codegen output hash for the ValidationAppHost.
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/.aspire/settings.json Polyglot settings for selecting SDK + integration package(s).
Files not reviewed (1)
  • playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/package-lock.json: Language not supported

Comment on lines +16 to +25
// withDataBindMount on RedisResource
cache2.withDataBindMount("/tmp/redis-data");

// withHostPort on RedisResource
cache.withHostPort({ port: 6379 });

// withPassword on RedisResource
const newPassword = await builder.addParameter("new-redis-password", { secret: true });
cache2.withPassword(newPassword);

Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

Same issue here: these calls return new promise wrappers but the results aren’t awaited/used, so the capability invocations are effectively skipped. Await these configuration calls (and ensure cache2 is awaited before property access/usage if you intend to validate those exports).

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit 4c96ab1:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AgentInitCommand_WithMalformedMcpJson_ShowsErrorAndExitsNonZero ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ❌ Upload failed
StopNonInteractiveSingleAppHost ❌ Upload failed
StopWithNoRunningAppHostExitsSuccessfully ❌ Upload failed
TypeScriptAppHostWithProjectReferenceIntegration ❌ Upload failed

📹 Recordings uploaded automatically from CI run #22682418819

@sebastienros sebastienros merged commit c5d31cd into release/13.2 Mar 4, 2026
385 checks passed
@sebastienros sebastienros deleted the sebros/polyglot-redis branch March 4, 2026 18:48
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 4, 2026
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
* Complete polyglot exports for Aspire.Hosting.Redis

* Update settings.json to remove sdkVersion

Removed sdkVersion and cleared Aspire.Hosting.Redis version.

* PR feedback
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.

3 participants