Skip to content

Fix Delve server API compatibility - #19081

Open
Sébastien Ros (sebastienros) wants to merge 3 commits into
mainfrom
sebros/fix-delve-api
Open

Fix Delve server API compatibility#19081
Sébastien Ros (sebastienros) wants to merge 3 commits into
mainfrom
sebros/fix-delve-api

Conversation

@sebastienros

@sebastienros Sébastien Ros (sebastienros) commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

This follows up on #17846 to preserve binary compatibility while correcting the API shape of the preview-versioned Aspire.Hosting.Go integration.

The shipped WithDelveServer<T>(builder, int port = 2345) method remains as an obsolete binary compatibility shim and preserves its original single-client behavior. Supported C# callers now use WithDelveServer() for defaults or WithDelveServer(DelveServerOptions) for expanded configuration. The ATS-friendly DTO uses the corrected AcceptMultiClient casing and defaults multi-client support to false.

Only the DTO-based overload is exported to generated SDKs, avoiding overload collisions. The Go integration README and Go, Java, Python, and TypeScript polyglot fixtures reflect the generated API shape. Targeted tests assert the complete default, obsolete-port, and all-options Delve argument sequences.

User-facing usage

C# AppHost:

builder.AddGoApp("api", "../go-api")
    .WithDelveServer();

builder.AddGoApp("worker", "../go-worker")
    .WithDelveServer(new DelveServerOptions
    {
        AcceptMultiClient = true,
        ContinueOnStart = true,
        Log = true,
        LogOutput = "rpc,dap,debugger"
    });

TypeScript AppHost:

const api = await builder.addGoApp("api", "../go-api");
await api.withDelveServer({
    acceptMultiClient: true,
    continueOnStart: true,
    log: true,
    logOutput: "rpc,dap,debugger",
});

Validation:

  • dotnet build src/Aspire.Hosting.Go/Aspire.Hosting.Go.csproj --no-restore
  • dotnet test --project tests/Aspire.Hosting.Go.Tests/Aspire.Hosting.Go.Tests.csproj --no-launch-profile -- --filter-method "*DelveServer*" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" (20 passed)
  • aspire sdk dump --format ci src/Aspire.Hosting.Go/Aspire.Hosting.Go.csproj
  • Generated SDK compilation for the Go, Java, Python, and TypeScript Aspire.Hosting.Go polyglot AppHosts

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 6, 2026 21:45

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Note

This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.

@sebastienros

Sébastien Ros (sebastienros) commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

/cc edmondshtogu (@edmondshtogu)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 6, 2026 22:23
@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Aug 6, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 6, 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 -- 19081

Or

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

@github-actions

This comment has been minimized.

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Note

This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Tests selector (audit mode)

The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement.

1 / 100 test projects · 3 jobs, from 9 changed files.

Selected test projects (1 / 100)

Aspire.Hosting.Go.Tests

Selected jobs (3)

extension-e2e, polyglot, typescript-api-compat


How these were chosen — grouped by what changed

🔧 src/Aspire.Hosting.Go/DelveServerOptions.cs (changed source)
1 directly: Aspire.Hosting.Go.Tests

🔧 src/Aspire.Hosting.Go/GoDelveServerAnnotation.cs (changed source)
1 directly: Aspire.Hosting.Go.Tests

🔧 src/Aspire.Hosting.Go/GoHostingExtensions.cs (changed source)
1 directly: Aspire.Hosting.Go.Tests

🧪 tests/Aspire.Hosting.Go.Tests/AddGoAppTests.cs (changed test)
1 directly: Aspire.Hosting.Go.Tests

🧪 tests/Aspire.Hosting.Go.Tests/GoPublicApiTests.cs (changed test)
1 directly: Aspire.Hosting.Go.Tests

Job reasons

Job Triggered by
extension-e2e src/Aspire.Hosting.Go/DelveServerOptions.cs, src/Aspire.Hosting.Go/GoDelveServerAnnotation.cs, src/Aspire.Hosting.Go/GoHostingExtensions.cs
• affected project Aspire.Hosting.Go
polyglot tests/PolyglotAppHosts/Aspire.Hosting.Go/Go/apphost.go, tests/PolyglotAppHosts/Aspire.Hosting.Go/Java/AppHost.java, tests/PolyglotAppHosts/Aspire.Hosting.Go/Python/apphost.py, tests/PolyglotAppHosts/Aspire.Hosting.Go/TypeScript/apphost.mts
• affected project Aspire.Hosting.Go
typescript-api-compat affected project Aspire.Hosting.Go

Selection computed for commit f7e1e5f.

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

Labels

area-integrations Issues pertaining to Aspire Integrations packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants