Complete polyglot exports for Aspire.Hosting.Redis#14946
Complete polyglot exports for Aspire.Hosting.Redis#14946sebastienros merged 3 commits intorelease/13.2from
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14946Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14946" |
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/.aspire/settings.json
Outdated
Show resolved
Hide resolved
Removed sdkVersion and cleared Aspire.Hosting.Redis version.
There was a problem hiding this comment.
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
RedisResourceproperties for polyglot access (with an explicit ignore forConnectionStringExpression). - 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 sampleapphost.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
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/.aspire/settings.json
Show resolved
Hide resolved
playground/polyglot/TypeScript/Aspire.Hosting.Redis/ValidationAppHost/apphost.ts
Outdated
Show resolved
Hide resolved
| // 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); | ||
|
|
There was a problem hiding this comment.
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).
🎬 CLI E2E Test RecordingsThe following terminal recordings are available for commit
📹 Recordings uploaded automatically from CI run #22682418819 |
* Complete polyglot exports for Aspire.Hosting.Redis * Update settings.json to remove sdkVersion Removed sdkVersion and cleared Aspire.Hosting.Redis version. * PR feedback
Related to #14069
Only the main method was exported, and no polyglot playground existed