Repository navigation
Fix for Aspire.Deployment.EndToEnd.Tests.TypeScriptJavaScriptHostingDeploymentTests.DeployTypeScriptStaticWebsiteWithNodeApiToAzureContainerApps - #17434
Conversation
Since PR #16984 ("Use mts for TypeScript AppHosts"), `aspire init --language typescript` creates apphost.mts (not apphost.ts). The test was writing its custom AppHost content to apphost.ts which was silently ignored: `aspire deploy` ran against the empty default apphost.mts (4/4 steps succeeded in ~97ms), no Azure resources were provisioned, and the verification step failed with "Resource group not found". Write the custom AppHost content to apphost.mts so it overwrites the init-generated file and is actually deployed. Fixes #17429 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 -- 17434Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17434" |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #17434... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
apphost.mts imports the generated SDK as './.aspire/modules/aspire.mjs', not aspire.js (which is only emitted for the legacy apphost.ts compat shape, into ./.modules/). The previous fix renamed the file to .mts but left the .js import unchanged, so the TypeScript compiler failed with TS2307 and aspire deploy errored before provisioning anything. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
|
|
❓ CLI E2E Tests unknown — 96 passed, 0 failed, 5 unknown (commit View all recordings
📹 Recordings uploaded automatically from CI run #26373319212 |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #17434... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
/deployment-test |
|
🚀 Deployment tests starting on PR #17434... This will deploy to real Azure infrastructure. Results will be posted here when complete. |
|
❌ Deployment E2E Tests failed — 39 passed, 1 failed, 0 cancelled View test results and recordings
|
James Newton-King (JamesNK)
left a comment
There was a problem hiding this comment.
LGTM. Straightforward fix — all three tests correctly updated to write apphost.mts (matching the new aspire init output from PR #16984) and use the aspire.mjs import path for ESM module resolution.
|
✅ No documentation update needed. Decision: The single triggered signal ( All 3 changed files are under
No documentation gap exists for this test-only fix. |
Fix for
Aspire.Deployment.EndToEnd.Tests.TypeScriptJavaScriptHostingDeploymentTests.DeployTypeScriptStaticWebsiteWithNodeApiToAzureContainerAppsFixes #17429
Problem
The test fails with:
The terminal recording shows
aspire deploycompletes in 97 ms with4/4 steps succeededand zero actual resources provisioned, then:Root Cause
Since PR #16984 ("Use mts for TypeScript AppHosts"),
aspire init --language typescriptcreatesapphost.mts, notapphost.ts.The test was writing its custom AppHost content to
apphost.ts, which isignored.
aspire deployran against the empty defaultapphost.mts,provisioned nothing, and the verification step failed because the resource
group was never created.
Fix
Write the custom AppHost content to
apphost.mts, overwriting theinit-generated empty file so it is actually deployed.
Verification
CI on this PR will run the standard build. After CI is green, the
/deployment-testcommand will be triggered to re-run the affecteddeployment E2E test against Azure and confirm the fix.