Add TypeScript JavaScript hosting coverage#17057
Conversation
Covers TypeScript polyglot JavaScript hosting APIs across compile-time fixture validation, local runtime E2E, Docker Compose publish E2E, and a representative Azure Container Apps deployment E2E. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17057Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17057" |
Avoid assuming fixed host ports for Vite and Next.js resources. Verify the actual runtime target port each guest receives so package-manager-specific command arguments can still be exercised reliably. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/deployment-test |
|
🚀 Deployment tests starting on PR #17057... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
Escape the JMESPath true literal in the endpoint verification command so Bash does not treat it as command substitution before az receives the query. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Deployment tests starting on PR #17057... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
Use the TypeScript endpoint callback export to set the static website publish endpoint target port and external flag directly. This keeps ACA ingress configured as HTTP while ensuring the endpoint is public for deployment verification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Deployment tests starting on PR #17057... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
Create the TypeScript static site HTTP endpoint before publishAsStaticWebsite so the publish helper updates an existing HTTP endpoint instead of creating a TCP endpoint named http. This lets withExternalHttpEndpoints expose the static site correctly for Docker Compose and ACA deployment verification. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Deployment tests starting on PR #17057... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
Give each JavaScript runtime fixture a unique fallback port so package-manager-specific argument forwarding does not cause multiple apps to compete for port 3000 during the TypeScript AppHost runtime test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds end-to-end coverage to validate that TypeScript polyglot AppHosts can consume the JavaScript hosting API surface, including publish APIs and representative CLI/deploy workflows.
Changes:
- Extends the checked-in TypeScript JavaScript hosting fixture to cover
addNextJsAppandpublishAs*APIs. - Updates CLI E2E coverage to (a) restore Docker Compose publish validation and (b) add a runtime scenario running multiple JS app types/package managers from a TS AppHost.
- Adds a new deployment E2E that deploys a TS AppHost using
publishAsStaticWebsite(with a Node API target) to Azure Container Apps.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/PolyglotAppHosts/Aspire.Hosting.JavaScript/TypeScript/apphost.ts | Expands TS fixture coverage for Next.js and publishAs* APIs. |
| tests/Aspire.Deployment.EndToEnd.Tests/TypeScriptJavaScriptHostingDeploymentTests.cs | New ACA deployment E2E for TS AppHost + JS static website publish with API proxy. |
| tests/Aspire.Cli.EndToEnd.Tests/JavaScriptPublishTests.cs | Restores/extends CLI E2E scenarios for JS hosting publish + TS runtime usage. |
| tests/Aspire.Cli.EndToEnd.Tests/Fixtures/JsPublish/staticsite/package.json | Adds missing package metadata for publish fixture. |
| tests/Aspire.Cli.EndToEnd.Tests/Fixtures/JsPublish/npmscript/package.json | Adds missing package metadata for publish fixture. |
| tests/Aspire.Cli.EndToEnd.Tests/Fixtures/JsPublish/npmscript/package-lock.json | Aligns lockfile metadata with package.json version. |
| tests/Aspire.Cli.EndToEnd.Tests/Fixtures/JsPublish/nodeserver/package.json | Adds missing package metadata for publish fixture. |
| tests/Aspire.Cli.EndToEnd.Tests/Fixtures/JsPublish/nextjs/package.json | Adds missing package metadata for publish fixture. |
| tests/Aspire.Cli.EndToEnd.Tests/Fixtures/JsPublish/nextjs/package-lock.json | Aligns lockfile metadata with package.json version. |
| tests/Aspire.Cli.EndToEnd.Tests/Fixtures/JsPublish/api/package.json | Adds missing package metadata for publish fixture. |
Files not reviewed (2)
- tests/Aspire.Cli.EndToEnd.Tests/Fixtures/JsPublish/nextjs/package-lock.json: Language not supported
- tests/Aspire.Cli.EndToEnd.Tests/Fixtures/JsPublish/npmscript/package-lock.json: Language not supported
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
Matched test failure patterns (1 test)
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Deployment tests starting on PR #17057... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
❌ Deployment E2E Tests failed — 35 passed, 1 failed, 0 cancelled View test results and recordings
|
…s-js-hosting-coverage
|
/deployment-test |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…phost.ts Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
|
Code-review only — CI on the latest head isn't fresh, so I read the diff rather than dogfood it. One bug to flag in the TS polyglot apphost fixture:
Everything else in the diff looked clean — node/vite/nextjs/js apps + lifecycle accessors, static website publish chain (which uses the correct two-statement form), nothing else jumped out. Once the two lines above are fixed this should be good. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
❓ CLI E2E Tests unknown — 94 passed, 0 failed, 2 unknown (commit View all recordings
📹 Recordings uploaded automatically from CI run #26110452861 |
|
✅ No documentation update needed. docs_optional → No triggered signals ( All 10 changed files are under
No new public API, CLI flags, configuration keys, or user-visible behavior was introduced. The PR adds test coverage for existing JavaScript hosting APIs. No documentation update is required. |
Description
Adds JavaScript hosting API coverage for TypeScript polyglot AppHosts. This expands coverage beyond compile/codegen checks so reviewers can validate TypeScript AppHost usage at fixture generation time, local runtime, Docker Compose publish, and a representative Azure Container Apps deployment path.
The change extends the checked-in TypeScript JavaScript hosting fixture with the missing Next.js and
publishAs*APIs, adds a CLI E2E scenario that runs multiple JavaScript app types and package managers from a TypeScript AppHost, restores the Docker Compose publish E2E by fixing fixture package metadata and version-prompt handling, and adds a deployment E2E forpublishAsStaticWebsitewith a Node API target.Fixes #17037
Checklist
<remarks />and<code />elements on your triple slash comments?