Skip to content

[release/17.0] Add Go AppHost editor support and debugger readiness coverage - #21999

Closed
Mitch Denny (mitchdenny) wants to merge 1 commit into
mitchdenny-backport-17-0-01-pr21806from
mitchdenny-backport-17-0-02-pr21826
Closed

Mitch Denny (mitchdenny) wants to merge 1 commit into
mitchdenny-backport-17-0-01-pr21806from
mitchdenny-backport-17-0-02-pr21826

Conversation

@mitchdenny

Copy link
Copy Markdown
Member

Description

Backport of #21826 to release/17.0 (cherry-picked from 54b4929 with no modifications). Layer 2 of 55 in the release/17.0 backport stack; stacked on #21998.

Backport recommendation: No — VS Code extension ships from main.

Backport of #21826

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

## Description

Adds Go AppHost resource parsing for CodeLens and gutter indicators, and
offers the existing debugger setup flow before debugging a Go, Java, or
Rust AppHost with missing debugger extensions. Selecting Set Up or
dismissing the prompt cancels this launch without a duplicate
launch-failure notification/history entry. Run Without Debugging remains
available.

Nested and parenthesized Go resource expressions retain their
declaration's CodeLens/gutter anchor. The README documents that
golang.go's toolchain settings govern the debugger, while Aspire CLI
resolves Go from its environment.

Adds Go AppHost-and-resource source-breakpoint coverage to the existing
resource-debug E2E shard. Generated AppHosts require Go 1.26, but the
old Delve v1.25.2 rejects that toolchain. Provisioning now selects Go
1.26.10 and Delve v1.27.2 without disabling compatibility checks or
changing action pins. Go code-generation changes select extension E2E
through both affected-project and path-fallback routing.

Relates to #21201, #21213, #21114, and #21115. Builds on already-merged
#21187 and #18602. #21211 remains open for live restart validation;
restart lifecycle/policy changes are intentionally deferred.

### Validation

**Latest head `ccded4f4cf`: actual CI logs inspected, not just job
conclusions.**

| Scenario | Linux | Windows |
| --- | --- | --- |
| Public Debug-command dismissal of missing Go debugger; no duplicate
error, session/process, pending launch, or installer invocation |
[Passed; tree-actions
7/7](https://github.com/microsoft/aspire/actions/runs/42153424399/job/127689898330)
| [Passed; tree-actions
7/7](https://github.com/microsoft/aspire/actions/runs/42153424399/job/127689898437)
|
| Next multi-root action-routing scenario after temporary Go fixture
cleanup | Passed in the same shard | Passed in the same shard |
| Real source breakpoints in both Go AppHost and Go resource using
packaged Delve | [Passed, 19.488 seconds; shard 4 passing / 4
pending](https://github.com/microsoft/aspire/actions/runs/42153424399/job/127689898350)
| [Passed, 26.818 seconds; shard 5 passing / 3
pending](https://github.com/microsoft/aspire/actions/runs/42153424399/job/127689898325)
|
| Full extension unit suite | See PR checks | [4151 passing / 9
pending](https://github.com/microsoft/aspire/actions/runs/42153424399/job/127682946315)
|

All four E2E jobs had an empty advisory-issue setting; these were not
masked failures. Both resource-debug shards also cover existing Go
resource attach/Run Without Debugging attach behavior. The prior
`6be2b99a45` Go breakpoint scenario also passed on
[Linux](https://github.com/microsoft/aspire/actions/runs/42116516011/job/127565932765)
and
[Windows](https://github.com/microsoft/aspire/actions/runs/42116516011/job/127565933063).
These results supersede the original unverified-breakpoint statement.

The first dismissal E2E revision passed its new scenario on both
platforms but failed the next existing multi-root scenario: deleting the
temporary Go fixture left its repository selection stale. `ccded4f4cf`
refreshes discovery and waits for the primary selection during teardown.
Latest-head CI above confirms both consecutive scenarios pass.

First added failing regressions reproducing both reviewer findings
(nested calls anchored to line 0; setup/dismissal produced
`StartDebuggingDeclined`). After fixes, these commands passed from
`extension`:

```powershell
corepack yarn compile-tests
corepack yarn lint
corepack yarn compile
corepack yarn unit-test --run out/test/goAppHostParser.test.js --run out/test/aspireCodeLensProvider.test.js --run out/test/appHostLaunchService.test.js --run out/test/appHostTreeView.test.js --run out/test/aspireDebugConfigurationProvider.test.js --run out/test/aspireDebugSession.test.js --run out/test/rpc/interactionServiceTests.test.js --timeout 120000
```

The focused suite passed **833 tests / 2 pending**. It covers the
registered public Debug-command callback through the real tree, launch
service, and resolver for setup and dismissal, with substituted
language-extension lookup, notifications, debugger start, and installer.
Assertions cover cancellation telemetry, no duplicate
notification/failure-history entry, cleared state, and preserved genuine
declined-launch errors after cancellation/token reuse.
Parser/lens/gutter coverage includes nested/parenthesized calls and
indexed receivers. Bundling passed with the same four pre-existing
webpack dependency warnings.

For the fixture-cleanup revision, compile-tests and lint passed again;
this command passed **463 tests / 2 pending**:

```powershell
corepack yarn unit-test --run out/test/appHostLaunchService.test.js --run out/test/appHostTreeView.test.js --run out/test/cliSpawn.test.js --timeout 120000
```

**Earlier failures disclosed:** initial Windows CI on `4285826199` had
4149 passing / 9 pending / 2 failing global fake-timer-count assertions
in unchanged POSIX cleanup tests. An independently initiated same-head
[rerun](https://github.com/microsoft/aspire/actions/runs/42149372040/job/127679739644)
passed 4151 / 9 pending; latest-head CI also passes all 4151. No
process-lifecycle/timer-policy changes were made. A full local Windows
`corepack yarn unit-test --timeout 120000` had 4149 passing / 9 pending
/ 2 failing unchanged download-cache file-identity/symlink timestamp
assertions; it is not claimed green.

Earlier extension commands also passed:

```powershell
corepack yarn generate-schema
corepack yarn unit-test --run out/test/goAppHostParser.test.js --run out/test/parsers.test.js --run out/test/aspireCodeLensProvider.test.js --run out/test/aspireDebugConfigurationProvider.test.js --run out/test/goDebugger.test.js --run out/test/debuggerInstallHints.test.js --run out/test/strings.test.js
corepack yarn unit-test --run out/test/e2eLaunchProfile.test.js --run out/test/aspireDebugSession.test.js --timeout 120000
```

The focused commands passed **392** and **318** tests respectively. The
second initially had 317 passing / 1 timeout at the default 20-second
budget; the explicit slow-host budget passed all 318. Schema generation
passed with the current source-built CLI and pinned SDK; unrelated
generated drift is excluded.

Repository-root commands:

```powershell
dotnet build src\Aspire.Cli\Aspire.Cli.csproj --nologo --verbosity quiet
dotnet test --project tests\Infrastructure.Tests\Infrastructure.Tests.csproj --no-launch-profile -- --filter-class 'Infrastructure.Tests.TestTriggerMap.TestTriggerMapTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true'
git diff --check
```

CLI build passed with a NU1903 advisory for the pinned ILCompiler
dependency; real-map tests passed **175/175**; whitespace checks passed.
A broader selector namespace run was **not green: 355 passed / 22
failed**, including Windows selecting WSL's shim with no `/bin/bash` and
access-denied temporary Git cleanup. The comparison-base script/tests
are unchanged from `origin/main`, and direct execution of the system
Bash shim reproduces the missing-shell error.

An isolated Docker control with Go 1.26.10 reproduced the old Delve
compatibility failure, then installed v1.27.2 and hit a real `main.main`
source breakpoint.

**Remaining live limitations:** actual Marketplace installation,
missing-Delve UX, and toolbar/keybinding restart across adapters.
Successful setup uses a substituted installer in integration coverage
rather than contacting Marketplace from offline E2E. No local
interactive Go session/screenshots were captured. The installed old
Aspire CLI was not used as current-product evidence. Adjacent Python
classification, Node/Bun/Deno display-name localization, and
download-cache behavior remain outside this PR. Mitch's approved,
explicitly non-blocking tree-sitter-go suggestion is a separate
follow-up; this PR does not replace its parser or modify dependency
manifests for that exploration.

### Screenshots / Recordings

> **This PR includes UI changes.** Please add screenshots or screen
recordings so reviewers can evaluate the visual changes without running
locally.
>
> - For before/after comparisons, place them side-by-side or label them
clearly.
> - For interactive changes (animations, transitions, new flows), prefer
a short screen recording (GIF or video).
> - If you cannot capture visuals now, note what scenario to test and
mark this section as TODO.

TODO: capture Go resource CodeLens/gutter indicators and the
missing-debugger Set Up prompt. Real Linux/Windows CI verifies
breakpoints, running CodeLens, and prompt dismissal, but no local
interactive screenshot was captured.

<!-- Add screenshots/recordings here -->

## Checklist

- Is this feature complete?
  - [ ] Yes. Ready to ship.
  - [x] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] 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
  - [x] 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
  - [x] No

---------

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 54b4929)
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

1 / 101 PR test projects · 2 PR jobs, from 25 changed files.

Selected PR test projects (1 / 101)

Infrastructure.Tests

Selected PR jobs (2)

extension-e2e, extension-unit


How these were chosen — grouped by what changed

📄 .github/workflows/extension-e2e-tests.yml (changed)
→ 1 directly: Infrastructure.Tests

📄 eng/github-ci/test-trigger-map.yml (changed)
→ 1 directly: Infrastructure.Tests

🧪 tests/Infrastructure.Tests/TestTriggerMap/TestTriggerMapTests.cs (changed test)
→ 1 directly: Infrastructure.Tests

Job reasons

Job Triggered by
extension-e2e .github/workflows/extension-e2e-tests.yml, extension/loc/xlf/aspire-vscode.xlf, extension/package.nls.json, extension/src/debugger/AspireDebugConfigurationProvider.ts, extension/src/debugger/debuggerInstallHints.ts, extension/src/editor/AspireCodeLensProvider.ts, extension/src/editor/AspireGutterDecorationProvider.ts, extension/src/editor/parsers/AppHostResourceParser.ts, extension/src/editor/parsers/goAppHostParser.ts, extension/src/editor/parsers/plainTextInactiveOffsets.ts, extension/src/loc/strings.ts, extension/src/services/AppHostLaunchService.ts, extension/src/test-e2e/resourceDebugTools.e2e.test.ts, extension/src/test-e2e/treeActions.e2e.test.ts, extension/src/test/appHostLaunchService.test.ts, extension/src/test/appHostTreeView.test.ts, extension/src/test/aspireCodeLensProvider.test.ts, extension/src/test/aspireDebugConfigurationProvider.test.ts, extension/src/test/aspireDebugSession.test.ts, extension/src/test/goAppHostParser.test.ts, extension/src/test/parsers.test.ts, extension/src/test/rpc/interactionServiceTests.test.ts, extension/src/testing/e2eStateFileBridge.ts
extension-unit .github/workflows/extension-e2e-tests.yml, extension/loc/xlf/aspire-vscode.xlf, extension/package.nls.json, extension/src/debugger/AspireDebugConfigurationProvider.ts, extension/src/debugger/debuggerInstallHints.ts, extension/src/editor/AspireCodeLensProvider.ts, extension/src/editor/AspireGutterDecorationProvider.ts, extension/src/editor/parsers/AppHostResourceParser.ts, extension/src/editor/parsers/goAppHostParser.ts, extension/src/editor/parsers/plainTextInactiveOffsets.ts, extension/src/loc/strings.ts, extension/src/services/AppHostLaunchService.ts, extension/src/test-e2e/resourceDebugTools.e2e.test.ts, extension/src/test-e2e/treeActions.e2e.test.ts, extension/src/test/appHostLaunchService.test.ts, extension/src/test/appHostTreeView.test.ts, extension/src/test/aspireCodeLensProvider.test.ts, extension/src/test/aspireDebugConfigurationProvider.test.ts, extension/src/test/aspireDebugSession.test.ts, extension/src/test/goAppHostParser.test.ts, extension/src/test/parsers.test.ts, extension/src/test/rpc/interactionServiceTests.test.ts, extension/src/testing/e2eStateFileBridge.ts

Selection computed for commit fa9571a.

@mitchdenny

Copy link
Copy Markdown
Member Author

Approved for inclusion in release/17.0. Do not merge yet.

Jose Perez Rodriguez (joperezr) pushed a commit that referenced this pull request Nov 11, 2026
…overage (#22103)

Backport of #21826 to release/17.0

/cc @IEvangelist

## Description

Standalone backport of Go AppHost editor support and debugger readiness
coverage. Targets `release/17.0` directly; the old chained backport
#21999 is left untouched.

Relates to #21201, #21213, #21114, and #21115. Does not close their
remaining work.

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] 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
  - [x] 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
  - [x] No

## Customer Impact

Go AppHosts gain resource editor navigation and reliable debugger
setup/cancellation without duplicate launch errors. Nested and
parenthesized Go resource expressions retain their declaration anchors.
The missing-debugger setup flow also covers Java and Rust.

## Testing

Backport verification: the aggregate diff has the same stable patch ID
as merged source commit `54b4929a235f9684a1dab460bbcd59f4f08412e1`:
`369fc10e9a8193a8b382adb9f0a1fb6b1790390d`. The PR targets
`release/17.0` directly and has no native stack membership.

Source-PR validation, not rerun locally on this backport:

```powershell
corepack yarn unit-test --run out/test/appHostLaunchService.test.js --run out/test/appHostTreeView.test.js --run out/test/cliSpawn.test.js --timeout 120000
```

Passed: 463 tests / 2 pending. Source CI also verified real Go
AppHost/resource breakpoints and missing-debugger cancellation on Linux
and Windows; see [source validation
run](https://github.com/microsoft/aspire/actions/runs/42153424399). The
source Windows full unit suite passed 4151 tests / 9 pending. The source
PR documents earlier failed runs separately.

No local release-branch tests were rerun. Release-branch CI was pending
when this section was written; this is not a claim that backport CI has
passed.

## Risk

Medium. Touches shared extension launch handling and test routing as
well as Go editor parsing; source unit and cross-platform debugger
coverage exercise those paths.

## Regression?

Unknown. The source PR does not identify a released-version regression.

---------

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: Copilot App <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.

2 participants