Skip to content

Refactor polyglot validation sample layout#15650

Open
sebastienros wants to merge 2 commits intomainfrom
sebros/polyglot-tests-layout
Open

Refactor polyglot validation sample layout#15650
sebastienros wants to merge 2 commits intomainfrom
sebros/polyglot-tests-layout

Conversation

@sebastienros
Copy link
Copy Markdown
Contributor

Description

Refactors the TypeScript, Python, and Java polyglot validation samples into shared per-language roots under tests/Polyglot, with one AppHost file per integration.

This also updates the Aspire CLI polyglot AppHost detection so suffixed filenames like aspire.hosting.sqlserver.apphost.ts are recognized, and adjusts the Java runtime/validation flow to compile renamed AppHosts through a temporary AppHost.java.

The CI validation scripts now target the new tests/Polyglot/<Language> layout and restore each sample with --apphost against a shared aspire.config.json per language.

Fixes # (issue)

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?

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 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 -- 15650

Or

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

@sebastienros sebastienros marked this pull request as ready for review March 27, 2026 18:34
Copilot AI review requested due to automatic review settings March 27, 2026 18:34
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

Refactors the polyglot validation samples into a shared tests/Polyglot/<Language> layout and updates CI validation scripts to validate per-language AppHosts via aspire restore --apphost.

Changes:

  • Moves validation inputs from playground/polyglot/** into tests/Polyglot/** (per-language roots; one AppHost file per integration).
  • Updates TypeScript/Python/Java CI validation scripts to enumerate *.apphost.* files and restore/typecheck/compile each one.
  • Adjusts Java validation compilation to copy suffixed AppHost filenames into a temporary AppHost.java before javac.

Reviewed changes

Copilot reviewed 256 out of 595 changed files in this pull request and generated 6 comments.

File Description
.github/workflows/polyglot-validation/test-typescript-playground.sh Switches validation to tests/Polyglot/TypeScript, restores per AppHost, and type-checks via a generated temporary tsconfig.
.github/workflows/polyglot-validation/test-python-playground.sh Switches validation to tests/Polyglot/Python, restores per AppHost, and byte-compiles the selected AppHost plus generated modules.
.github/workflows/polyglot-validation/test-java-playground.sh Switches validation to tests/Polyglot/Java, restores per AppHost, and compiles by copying the selected AppHost into a temporary AppHost.java.
playground/polyglot/** Removes legacy per-sample configs/run settings now superseded by the shared tests/Polyglot/<Language> layout.
Files not reviewed (17)
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.AppConfiguration/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.AppContainers/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.AppService/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.ApplicationInsights/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.CognitiveServices/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.ContainerRegistry/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.CosmosDB/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.EventHubs/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.Functions/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.KeyVault/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.Kusto/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.OperationalInsights/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.PostgreSQL/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.Redis/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.Search/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.ServiceBus/ValidationAppHost/package-lock.json: Language not supported
  • playground/polyglot/TypeScript/Aspire.Hosting.Azure.SignalR/ValidationAppHost/package-lock.json: Language not supported

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

🎬 CLI E2E Test Recordings — 52 recordings uploaded (commit 0c32bfe)

View recordings
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
CreateStartAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ 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
InvalidAppHostPathWithComments_IsHealedOnRun ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
PublishWithDockerComposeServiceCallbackSucceeds ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
RunWithMissingAwaitShowsHelpfulError ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ▶️ View Recording
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ▶️ View Recording
TypeScriptAppHostWithProjectReferenceIntegration ▶️ View Recording

📹 Recordings uploaded automatically from CI run #23662411671

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants