Skip to content

Fix Python starter TypeScript health check build - #16625

Merged
Sébastien Ros (sebastienros) merged 6 commits into
mainfrom
sebastienros/sebros-verify-issue-16291
May 1, 2026
Merged

Sébastien Ros (sebastienros) merged 6 commits into
mainfrom
sebastienros/sebros-verify-issue-16291

Conversation

@sebastienros

Copy link
Copy Markdown
Contributor

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 so npm run build verifies the generated AppHost instead of traversing unrelated frontend sources.

Fixes #16291

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 withHttpHealthCheck with the supported options object.
  • Align the Python starter’s root tsconfig.json/package.json build 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 build after 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.

@github-actions

github-actions Bot commented Apr 30, 2026 •

Copy link
Copy Markdown
Contributor

🚀 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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16625

Or

  • Run remotely in PowerShell:
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]>
@sebastienros
Sébastien Ros (sebastienros) force-pushed the sebastienros/sebros-verify-issue-16291 branch from 1971e4f to a6db8a9 Compare April 30, 2026 23:46
@sebastienros

Copy link
Copy Markdown
Contributor Author

/backport to release/13.3

@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

Started backporting to release/13.3 (link to workflow run)

@sebastienros
Sébastien Ros (sebastienros) deleted the sebastienros/sebros-verify-issue-16291 branch May 1, 2026 14:12
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.4 milestone May 1, 2026
@sebastienros
Sébastien Ros (sebastienros) restored the sebastienros/sebros-verify-issue-16291 branch May 1, 2026 14:13
@sebastienros Sébastien Ros (sebastienros) removed this from the 13.4 milestone May 1, 2026
@sebastienros

Copy link
Copy Markdown
Contributor Author

/backport to release/13.3

@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

Started backporting to release/13.3 (link to workflow run)

@sebastienros
Sébastien Ros (sebastienros) merged commit 37073b8 into main May 1, 2026
568 of 571 checks passed
@sebastienros
Sébastien Ros (sebastienros) deleted the sebastienros/sebros-verify-issue-16291 branch May 1, 2026 18:19
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings — 76 recordings uploaded (commit a547938)

View all recordings
Status Test Recording
❔ AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
❔ AddPackageWhileAppHostRunningDetached ▶️ View Recording
❔ AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
❔ AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
❔ AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
❔ AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
❔ AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
❔ Banner_DisplayedOnFirstRun ▶️ View Recording
❔ Banner_DisplayedWithExplicitFlag ▶️ View Recording
❔ Banner_NotDisplayedWithNoLogoFlag ▶️ View Recording
❔ CertificatesClean_RemovesCertificates ▶️ View Recording
❔ CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate ▶️ View Recording
❔ CertificatesTrust_WithUntrustedCert_TrustsCertificate ▶️ View Recording
❔ ConfigSetGet_CreatesNestedJsonFormat ▶️ View Recording
❔ CreateAndRunAspireStarterProject ▶️ View Recording
❔ CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
❔ CreateAndRunEmptyAppHostProject ▶️ View Recording
❔ CreateAndRunJavaEmptyAppHostProject ▶️ View Recording
❔ CreateAndRunJsReactProject ▶️ View Recording
❔ CreateAndRunPythonReactProject ▶️ View Recording
❔ CreateAndRunTypeScriptEmptyAppHostProject ▶️ View Recording
❔ CreateAndRunTypeScriptStarterProject ▶️ View Recording
❔ CreateJavaAppHostWithViteApp ▶️ View Recording
❔ CreateTypeScriptAppHostWithViteApp_UsesConfiguredToolchain ▶️ View Recording
❔ DashboardRunWithOtelTracesReturnsNoTraces ▶️ View Recording
❔ DeployK8sBasicApiService ▶️ View Recording
❔ DeployK8sWithGarnet ▶️ View Recording
❔ DeployK8sWithMongoDB ▶️ View Recording
❔ DeployK8sWithMySql ▶️ View Recording
❔ DeployK8sWithPostgres ▶️ View Recording
❔ DeployK8sWithRabbitMQ ▶️ View Recording
❔ DeployK8sWithRedis ▶️ View Recording
❔ DeployK8sWithSqlServer ▶️ View Recording
❔ DeployK8sWithValkey ▶️ View Recording
❔ DeployTypeScriptAppToKubernetes ▶️ View Recording
❔ DescribeCommandResolvesReplicaNames ▶️ View Recording
❔ DescribeCommandShowsRunningResources ▶️ View Recording
❔ DetachFormatJsonProducesValidJson ▶️ View Recording
❔ DetachFormatJsonProducesValidJsonWhenRestartingExistingInstance ▶️ View Recording
❔ DoListStepsShowsPipelineSteps ▶️ View Recording
❔ DocsCommand_RendersInteractiveMarkdownFromLocalSource ▶️ View Recording
❔ DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
❔ DoctorCommand_TypeScriptAppHostReportsMissingConfiguredToolchain ▶️ View Recording
❔ DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
❔ DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
❔ GlobalMigration_HandlesCommentsAndTrailingCommas ▶️ View Recording
❔ GlobalMigration_HandlesMalformedLegacyJson ▶️ View Recording
❔ GlobalMigration_PreservesAllValueTypes ▶️ View Recording
❔ GlobalMigration_SkipsWhenNewConfigExists ▶️ View Recording
❔ GlobalSettings_MigratedFromLegacyFormat ▶️ View Recording
❔ InitTypeScriptAppHost_AugmentsExistingViteRepoAtRoot ▶️ View Recording
❔ InteractiveCSharpInitCreatesExpectedFiles ▶️ View Recording
❔ InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
❔ LatestCliCanStartStableChannelAppHost ▶️ View Recording
❔ LatestCliCanStartStableChannelTypeScriptAppHost ▶️ View Recording
❔ LegacySettingsMigration_AdjustsRelativeAppHostPath ▶️ View Recording
❔ LogsCommandShowsResourceLogs ▶️ View Recording
❔ OtelLogsReturnsStructuredLogsFromStarterAppCore ▶️ View Recording
❔ PsCommandListsRunningAppHost ▶️ View Recording
❔ PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
❔ PublishWithConfigureEnvFileUpdatesEnvOutput ▶️ View Recording
❔ PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
❔ PublishWithoutOutputPathUsesAppHostDirectoryDefault ▶️ View Recording
❔ RestoreGeneratesSdkFiles ▶️ View Recording
❔ RestoreGeneratesSdkFiles_WithConfiguredToolchain ▶️ View Recording
❔ RestoreRefreshesGeneratedSdkAfterAddingIntegration ▶️ View Recording
❔ RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes ▶️ View Recording
❔ RunFromParentDirectory_UsesExistingConfigNearAppHost ▶️ View Recording
❔ SecretCrudOnDotNetAppHost ▶️ View Recording
❔ SecretCrudOnTypeScriptAppHost ▶️ View Recording
❔ StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
❔ StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets ▶️ View Recording
❔ StopAllAppHostsFromAppHostDirectory ▶️ View Recording
❔ StopNonInteractiveSingleAppHost ▶️ View Recording
❔ StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
❔ UnAwaitedChainsCompileWithAutoResolvePromises ▶️ View Recording

📹 Recordings uploaded automatically from CI run #25225363715

@github-actions github-actions Bot added this to the 13.4 milestone May 1, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

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 withHttpHealthCheck call (string overload → options object) and aligns the TypeScript build config. These are internal template/build fixes with no new APIs, features, or behavioral changes that would require documentation updates. Existing docs already cover the withHttpHealthCheck API correctly.

Generated by PR Documentation Check for issue #16625 · ● 113.1K · ◷

Nell Shamrell-Harrington (nellshamrell) pushed a commit to nellshamrell/aspire that referenced this pull request May 18, 2026
* 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]>
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeScript python template is broken because withHttpHealthCheck no longer accepts a string path

3 participants