Repository navigation
Fix Python starter TypeScript health check build - #16625
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Python FastAPI/React starter’s TypeScript AppHost template so it type-checks against the current TS API surface (fixing withHttpHealthCheck usage) and ensures npm run build validates only the generated AppHost + generated .modules code instead of traversing unrelated frontend sources.
Changes:
- Update the Python starter AppHost template to call
withHttpHealthCheckwith the supported options object. - Align the Python starter’s root
tsconfig.json/package.jsonbuild scripts to compile the AppHost scope (similar to the TS starter’s AppHost-specific config). - Extend the Python/React CLI E2E test to run
npm run buildafter project creation.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/Aspire.Cli.EndToEnd.Tests/PythonReactTemplateTests.cs | Adds a build verification step to ensure the generated TypeScript AppHost compiles in CI. |
| src/Aspire.Cli/Templating/Templates/py-starter/tsconfig.json | Scopes TypeScript compilation to apphost.ts and .modules and aligns compiler settings with NodeNext/AppHost build expectations. |
| src/Aspire.Cli/Templating/Templates/py-starter/package.json | Updates scripts so npm run build runs an AppHost-only TypeScript build (and keeps aspire:* namespaced scripts). |
| src/Aspire.Cli/Templating/Templates/py-starter/apphost.ts | Fixes template to use the supported withHttpHealthCheck({ path }) overload. |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16625Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16625" |
Update the Python starter TypeScript AppHost to use the supported withHttpHealthCheck options object and align its root build script with AppHost-only type checking. Add E2E coverage that verifies the generated starter builds successfully. Co-authored-by: Copilot <[email protected]>
Update the Python React template E2E build verification to use the existing fail-fast command helper so npm build failures are surfaced immediately. Co-authored-by: Copilot <[email protected]>
1971e4f to
a6db8a9
Compare
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
/backport to release/13.3 |
|
Started backporting to |
Co-authored-by: Copilot <[email protected]>
|
/backport to release/13.3 |
|
Started backporting to |
Co-authored-by: Copilot <[email protected]>
|
🎬 CLI E2E Test Recordings — 76 recordings uploaded (commit View all recordings
📹 Recordings uploaded automatically from CI run #25225363715 |
|
No documentation PR is needed for this change. This PR is a bug fix for the Python starter TypeScript AppHost template — it corrects an incorrect
|
* Fix Python starter health check template Update the Python starter TypeScript AppHost to use the supported withHttpHealthCheck options object and align its root build script with AppHost-only type checking. Add E2E coverage that verifies the generated starter builds successfully. Co-authored-by: Copilot <[email protected]> * Use fail-fast helper for Python starter build test Update the Python React template E2E build verification to use the existing fail-fast command helper so npm build failures are surfaced immediately. Co-authored-by: Copilot <[email protected]> * Verify TypeScript templates build Co-authored-by: Copilot <[email protected]> * Add build script aliases to TypeScript AppHost scaffold Co-authored-by: Copilot <[email protected]> * Use AppHost tsconfig for TypeScript AppHost lint Co-authored-by: Copilot <[email protected]> * Use AppHost tsconfig name for Python starter Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
Description
The Python starter template generated a TypeScript AppHost that no longer type-checked because it used the old string overload for
withHttpHealthCheck. This updates the template to use the supported options object and aligns the root build script sonpm run buildverifies the generated AppHost instead of traversing unrelated frontend sources.Fixes #16291
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: