Skip to content

Add polyglot exports for Aspire.Hosting.Seq#14890

Merged
sebastienros merged 1 commit intorelease/13.2from
sebros/polyglot-seq
Mar 3, 2026
Merged

Add polyglot exports for Aspire.Hosting.Seq#14890
sebastienros merged 1 commit intorelease/13.2from
sebros/polyglot-seq

Conversation

@sebastienros
Copy link
Contributor

Description

Add polyglot AspireExport coverage for Aspire.Hosting.Seq.
Related to #14069.

Validation:

  • dotnet build src/Aspire.Hosting.Seq/Aspire.Hosting.Seq.csproj -v minimal
  • (cd playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost && npx tsc --noEmit)

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>
Copilot AI review requested due to automatic review settings March 3, 2026 18:07
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 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/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14890

Or

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

Copy link
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

Adds ATS/polyglot export coverage for the Aspire.Hosting.Seq integration so TypeScript AppHosts can consume the Seq resource APIs, plus a TypeScript validation AppHost to compile-check the generated SDK.

Changes:

  • Annotate Seq extension methods with [AspireExport] / [AspireExportIgnore] for polyglot capability generation.
  • Add a TypeScript ValidationAppHost for Aspire.Hosting.Seq (config + sample apphost) to validate tsc --noEmit.
  • Check in the generated .modules/* TypeScript SDK output for the validation project.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Aspire.Hosting.Seq/SeqBuilderExtensions.cs Adds ATS export metadata for AddSeq, WithDataVolume, and WithDataBindMount (and ignores a convenience overload).
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/tsconfig.json TypeScript compiler configuration for the validation AppHost.
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/package.json Node/TS dependencies and scripts for the validation AppHost.
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/package-lock.json Locked dependency graph for reproducible installs.
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/apphost.ts Sample TypeScript AppHost exercising the exported Seq APIs.
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/apphost.run.json Local run profile settings for the validation AppHost.
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/.modules/transport.ts Generated ATS transport/runtime support.
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/.modules/base.ts Generated shared base types (handles, list/dict wrappers, reference expressions).
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/.modules/aspire.ts Generated capability-based TypeScript SDK including Seq bindings.
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/.modules/.codegen-hash Hash pinning the codegen output version/source.
playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/.aspire/settings.json Aspire CLI settings enabling the TypeScript AppHost and package selection.
Files not reviewed (1)
  • playground/polyglot/TypeScript/Aspire.Hosting.Seq/ValidationAppHost/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

src/Aspire.Hosting.Seq/SeqBuilderExtensions.cs:50

  • adminPassword is nullable but not optional in the exported AddSeq signature, so the generated TypeScript API requires an admin password and can’t represent the documented “no authentication” scenario without unsafe casts. Consider making adminPassword an optional parameter (e.g., defaulting to null) or adding a separate exported overload/capability that disables authentication.
    [AspireExport("addSeq", Description = "Adds a Seq server container resource")]
    public static IResourceBuilder<SeqResource> AddSeq(
        this IDistributedApplicationBuilder builder,
        string name,
        IResourceBuilder<ParameterResource>? adminPassword,
        int? port = null)

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit 0350523:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AgentInitCommand_WithMalformedMcpJson_ShowsErrorAndExitsNonZero ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ 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
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ 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

📹 Recordings uploaded automatically from CI run #22636476967

@sebastienros sebastienros merged commit de9d126 into release/13.2 Mar 3, 2026
389 checks passed
@sebastienros sebastienros deleted the sebros/polyglot-seq branch March 3, 2026 19:53
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 3, 2026
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

3 participants