Skip to content

[docs] Document Go AppHost init in existing Go repositories - #2073

Closed
aspire-repo-bot[bot] wants to merge 3 commits into
release/17.0from
docs/pr-21823-42168806710-1-b21b4b75ce4d692d
Closed

aspire-repo-bot[bot] wants to merge 3 commits into
release/17.0from
docs/pr-21823-42168806710-1-b21b4b75ce4d692d

Conversation

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#21823

Author: @davidfowl (source PR author; see source PR)

Targeting release/17.0 based on the source PR milestone 17.0 (target_resolution: exact_match).

Why

aspire init --language go now works in an existing Go repository without replacing its go.mod or workspace: it creates a separate aspire-apphost/ module with its own go.work and records aspire-apphost/apphost.go in the root aspire.config.json. The CLI reference didn't describe this.

Triggered signals: cli_resource_strings_changed (InitCommandStrings.resx), pr_body_has_cli_flag_mention, pr_body_has_user_facing_section.

Changes

  • Updated: src/frontend/src/content/docs/reference/cli/commands/aspire-init.mdx (Go AppHost bullet).

Generated by PR Documentation Check for #21823 · copilot · auto · 26.1 AIC · ⌖ 1.16 AIC · ⊞ 7.4K · ◷

@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label Nov 6, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #2073. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #2073 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

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.

🟡 Changes recommended

The documentation promises nested Go AppHosts on release/17.0, but that branch instead initializes at the module root and aborts on the existing go.mod.

1 open issue
What changed in this PR

Updates the CLI reference to describe initializing a Go AppHost in an existing Go repository, following microsoft/aspire#21823.

Changes:

  • Describes the separate aspire-apphost/ module and preservation of existing Go files.
  • Explains workspace isolation, the root configuration path, and respect for an explicit GOWORK override.
File Description
src/​frontend/​src/​content/​docs/​reference/​cli/​commands/​aspire-init.mdx Expands the Go AppHost bullet with existing-repository initialization behavior.

Review effort: Balanced

- **C# file-based AppHost** (when selected interactively) — creates `apphost.cs` with `#:sdk` and `#:package` directives for a lightweight single-file orchestrator.
- **TypeScript AppHost** (when selected interactively) — creates `apphost.mts` with the generated `.aspire/modules/` folder. If the repo already has a root `package.json`, the AppHost is created as a nested `aspire-apphost/` package and the root `aspire.config.json` points to `aspire-apphost/apphost.mts`.
- **Go AppHost** (when selected interactively): creates `apphost.go`, a `go.mod` that points at the generated SDK, and the generated `.aspire/modules/` folder.
- **Go AppHost** (when selected interactively) — creates `apphost.go`, a `go.mod` that points at the generated SDK, and the generated `.aspire/modules/` folder. If the repo already has a root `go.mod`, the existing module, `go.work`, and source files are left unchanged. The AppHost is created as a separate `aspire-apphost/` module with its own `go.work`, so that an ancestor workspace that doesn't list it doesn't interfere. The root `aspire.config.json` points to `aspire-apphost/apphost.go`. An explicit `GOWORK` environment variable override is respected.
…er (#1986)

## Summary

The Developer Hub E2E layout tests fail when a CI runner lands in a
region where Microsoft's WCP cookie-consent script shows its banner. The
banner is a fixed strip at the top of the page, and `wcp-consent.css`
pushes `.page` down by its height. The Hub specs don't stub
`wcpstatic.microsoft.com`, so in those regions eight layout assertions
fail on every attempt.

Example: [run 40999614344, mobile-chromium shard
1/2](https://github.com/microsoft/aspire.dev/actions/runs/40999614344/job/123883461177)
on #1984. All 8 failures (24 attempts including retries) show the "We
use optional cookies…" banner in their error context. The other five
shards passed.

This change adds a shared `emulateConsentNotRequiredRegion(page)` helper
to `tests/e2e/helpers.ts` that:

- aborts `wcpstatic.microsoft.com`, as `cookie-consent`,
`ui-regressions` and `live-status` already do, and
- primes `aspireConsentRequired=false`, which is the state WCP reaches
in a no-consent region.

The helper is applied to `dev-browse`, `dev-layout` and `dev-grain`.
`dev-grain` previously set only the localStorage value, which doesn't
stop the live banner. Assertions, timeouts and retries are unchanged.
Banner behavior stays covered by `cookie-consent.spec.ts` and
`cookie-dialog-layout.spec.ts`.

## Third-party links and affiliations

None.

## Validation

I reproduced the CI condition locally by serving a consent-required WCP
stand-in on `wcpstatic.microsoft.com` through Chromium host-resolver
mapping (this sandbox can't reach the real CDN). The stand-in's text,
links and buttons match the banner captured in CI. Results are on
mobile-chromium against `astro dev`:

| Test | main + banner | this PR + banner |
| --- | --- | --- |
| `dev-browse` mobile filters (`:579`) | ❌ `box.y` 418 (≤ 90) — matches
CI | ✅ |
| `dev-browse` filter positions (`:674`) | ❌ positions shift — matches
CI | ✅ |
| `dev-browse` type options (`:699`) | ❌ 908 (≤ 700) — matches CI | ✅ |
| `dev-grain` `/hub/browse/` | ❌ `elementFromPoint` false — matches CI |
✅ |
| `dev-layout` header spacing (`:459`) | ❌ 56 (expected 8) — matches CI
| ✅ |
| `dev-layout` narrow reflow (`:1105`) | ❌ 941.5 (< 900) | ✅ |
| `dev-browse` initial paint ×2 (`:131`) | ❌ 341 px offset (CI: 428) |
⚠️ 4 px |

On main without the banner, the initial-paint cases also drift 4 px
under `astro dev`. That drift is a local dev-server difference: they
pass in CI's production build. With the fix, the stub received 0
requests.

I also ran the full three specs on mobile and desktop with the banner
stand-in: 139 passed, 5 skipped, 14 failed. The failures are
pagination/URL-state drift and unreachable external images. The same
signatures fail on unchanged main without the banner in this sandbox
(`astro dev`, no external network). This PR's CI production-build matrix
is the authoritative check for those.

- `eslint . --max-warnings 0` (with `astro sync` and the skill-digest
check) passes.
- Prettier and `tsc` findings on `helpers.ts`/`dev-grain.spec.ts` are
present on main too.

**🤖 Posted by AspireAgent (AI Agent)**

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
David Pine (IEvangelist) added a commit that referenced this pull request Nov 17, 2026
## Summary

Consolidates the open `docs-from-code` PRs that cover features from
@IEvangelist's product work or that request their review, all targeting
`release/17.0`, into this single PR. Each PR was checked against its
merged microsoft/aspire source PR and against product `release/17.0`, to
confirm the change shipped in 17.0 and is user-facing rather than an
implementation detail. Accepted text was corrected where the bot's
wording was inaccurate.

| PR(s) | Verdict | Notes |
| --- | --- | --- |
| #2103, #2098, #1967, #2073, #2070 | Accepted with fixes | Go AppHost
conventions, `aspire init`, and VS Code extension. Unrelated e2e test
edits from #2073 were dropped. |
| #1972 | Partially accepted | Only the verified behavior was kept. |
| #2069, #2064, #1829 | Accepted with fixes | Dashboard explore page and
`aspire describe --format Mermaid` |
| #2044 | Partially accepted | The Cards/Home/Graph layout selector text
is outdated, so it was dropped. |
| #1959, #1904, #1835, #1801 | Accepted with fixes | `WithTerminal`
options, the dashboard terminal UX, and TypeScript `configure` |
| #1902 | Accepted with fixes | `dotnet run --operation publish`
guidance |
| #2081 | Accepted with fixes | WSLc limited publish support. The
minimum version is corrected to 3.0.4.0. |
| #2014, #1862, #1809, #1936, #2140, #1997, #2051, #2068, #2022, #1963 |
Accepted with fixes | DCP timeouts, the container tunnel base image,
browser origins, the PVC `WithConfiguration` API, the interaction
service caution, secrets, `aspire update`, and agent init telemetry |
| #2092 | Rejected | Documents implementation details. |
| #2078 | Rejected | Already documented correctly; the proposed text was
wrong. |
| #2110, #2104, #2085, #2094 | Rejected | The product change isn't in
`release/17.0`; it's 17.1-only. Redo these against the next release
branch. |
| #2133 | Rejected for now | Its backport, microsoft/aspire#22219, is
still open, so redo this once it merges. |

Additional consistency fixes:

- **WSLc:** the minimum version is now 3.0.4.0, the source's
`MinimumWslcVersion`, across prerequisites, `aspire doctor`,
configuration, and what's new. The pages now describe limited publish
support and state that Docker Compose isn't supported.
- **`WithTerminal`:** `WithTerminal` and `TerminalOptions` are no longer
`[Experimental]` in 17.0. I removed the stale `ASPIRETERMINAL001`
pragmas and cautions and rewrote the diagnostic page to cover the
terminal APIs that are still experimental.

Closes #2140
Closes #2133
Closes #2110
Closes #2104
Closes #2103
Closes #2098
Closes #2094
Closes #2092
Closes #2085
Closes #2081
Closes #2078
Closes #2073
Closes #2070
Closes #2069
Closes #2068
Closes #2064
Closes #2051
Closes #2044
Closes #2022
Closes #2014
Closes #1997
Closes #1972
Closes #1967
Closes #1963
Closes #1959
Closes #1936
Closes #1904
Closes #1902
Closes #1862
Closes #1835
Closes #1829
Closes #1809
Closes #1801

## Third-party links and affiliations

None. The only added external link is to mermaid.js.org, which the page
already links elsewhere.

## Validation

- I compared each claim with the merged microsoft/aspire source and
checked that it's included in product `release/17.0`, using `gh api
compare` and searches for backport PRs.
- I checked the TypeScript sample against the generated `aspire.d.ts`.
`EndpointReferenceExpression` is an `IValueProvider`.
- I reviewed the full diff by hand for MDX and table formatting,
imports, and anchors. The new `seoTitle` is 58 characters.
- I didn't run any local unit, e2e, or build commands because frontend
dependencies aren't installed locally. CI covers the build, unit, and
e2e checks, including the updated `custom-components.spec.ts` assertion.

---------

Co-authored-by: David Pine <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@alistairmatthews

Copy link
Copy Markdown
Collaborator

Superseded by #2189 (merged to release/17.0)

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

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants