Skip to content

[release/13.3] Fix Python starter TypeScript health check build#16647

Merged
joperezr merged 6 commits intorelease/13.3from
backport/pr-16625-to-release/13.3
May 1, 2026
Merged

[release/13.3] Fix Python starter TypeScript health check build#16647
joperezr merged 6 commits intorelease/13.3from
backport/pr-16625-to-release/13.3

Conversation

@aspire-repo-bot
Copy link
Copy Markdown
Contributor

@aspire-repo-bot aspire-repo-bot Bot commented May 1, 2026

Backport of #16625 to release/13.3

/cc @sebastienros

Customer Impact

Python starter template doesn't build (uses old health check method).
TypeScript empty AppHost template fails linting when called explicitly.

Testing

Added build verification for all typescript apphost based templates

Risk

Low

Regression?

From previous release

sebastienros and others added 5 commits May 1, 2026 15:22
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 <223556219+Copilot@users.noreply.github.com>
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 <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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 1, 2026 15:22
@aspire-repo-bot aspire-repo-bot Bot review requested due to automatic review settings May 1, 2026 15:22
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

🚀 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 -- 16647

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16647"

@sebastienros sebastienros added the Servicing-consider Issue for next servicing release review label May 1, 2026
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is outside your change - but why is this file named tsconfig.json when the TypeScript template names it tsconfig.apphost.json?

languageOptions: {
parserOptions: {
projectService: true,
project: './tsconfig.apphost.json',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is different than the python template. Is that intentional?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It feels like python and ts should drop the exact same apphost files, unless there is a specific reason not to.

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.

Instead of adapting I should have aligned the two, doing it now, but on the main branch first

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.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 1, 2026 18:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Backports fixes to the release/13.3 branch to ensure TypeScript AppHost projects generated by templates (notably the Python starter) build and lint correctly with the current TypeScript SDK and ESLint configuration.

Changes:

  • Updates TypeScript AppHost scaffolding and template ESLint configuration to explicitly target tsconfig.apphost.json (avoids traversing unrelated TS sources).
  • Adds “wrapper” root npm scripts (build, lint, dev, etc.) for greenfield TypeScript AppHost projects to make npm run build/npm run lint behave as expected.
  • Strengthens CLI E2E coverage by verifying npm run build succeeds for TypeScript-based AppHost templates, and fixes the Python starter’s TypeScript health check callsite.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/TypeScriptLanguageSupportTests.cs Updates expectations for newly scaffolded package.json scripts and validates ESLint config targets tsconfig.apphost.json.
tests/Aspire.Cli.EndToEnd.Tests/TypeScriptStarterTemplateTests.cs Adds npm run build verification for the TypeScript starter template before starting the app.
tests/Aspire.Cli.EndToEnd.Tests/TypeScriptEmptyAppHostTemplateTests.cs Adds npm run build verification for the empty TypeScript AppHost template.
tests/Aspire.Cli.EndToEnd.Tests/PythonReactTemplateTests.cs Adds npm run build verification for the Python/React (TypeScript AppHost) template.
src/Aspire.Hosting.CodeGeneration.TypeScript/TypeScriptLanguageSupport.cs Switches ESLint parser options to a dedicated AppHost tsconfig and adds greenfield-friendly root npm script aliases.
src/Aspire.Cli/Templating/Templates/ts-starter/eslint.config.mjs Aligns ESLint config to lint using tsconfig.apphost.json and an explicit root dir.
src/Aspire.Cli/Templating/Templates/py-starter/tsconfig.json Removes the old root tsconfig.json that no longer matches the intended AppHost compilation flow.
src/Aspire.Cli/Templating/Templates/py-starter/tsconfig.apphost.json Adds a dedicated AppHost tsconfig matching the CLI scaffolding approach.
src/Aspire.Cli/Templating/Templates/py-starter/package.json Renames AppHost scripts under aspire:* and adds root wrappers so npm run build/npm run lint work.
src/Aspire.Cli/Templating/Templates/py-starter/eslint.config.mjs Aligns ESLint config to lint using tsconfig.apphost.json and an explicit root dir.
src/Aspire.Cli/Templating/Templates/py-starter/apphost.ts Updates to the supported withHttpHealthCheck({ path }) call pattern.

@joperezr joperezr added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels May 1, 2026
@sebastienros sebastienros added this to the 13.3 milestone May 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

🎬 CLI E2E Test Recordings — 66 recordings uploaded (commit 94b9792)

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
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
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
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
UnAwaitedChainsCompileWithAutoResolvePromises ▶️ View Recording

📹 Recordings uploaded automatically from CI run #25226700754

Copy link
Copy Markdown
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

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

Change is minimal, fixing real customer-facing bugs. Looks good to go.

@joperezr joperezr merged commit 34a86ad into release/13.3 May 1, 2026
276 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot modified the milestone: 13.3 May 1, 2026
@aspire-repo-bot
Copy link
Copy Markdown
Contributor Author

No documentation PR is required for this change.

This is a bug fix backport that corrects template build issues (broken TypeScript health check method call and ESLint config) in the Python starter and TypeScript AppHost templates. It restores expected behavior without introducing new APIs, features, or configuration options that would require documentation updates.

Generated by PR Documentation Check for issue #16647 · ● 112.7K ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants