Skip to content

[docs] Expand 13.2 Connection property suffix breaking change with migration guidance#944

Draft
IEvangelist wants to merge 1 commit into
mainfrom
dapine/connection-property-suffix-413
Draft

[docs] Expand 13.2 Connection property suffix breaking change with migration guidance#944
IEvangelist wants to merge 1 commit into
mainfrom
dapine/connection-property-suffix-413

Conversation

@IEvangelist
Copy link
Copy Markdown
Member

Summary

Fixes #413.

The Connection property suffix breaking change in the Aspire 13.2 release notes currently reads, in its entirety:

A connection property suffix has been added which may require updates to code that accesses connection properties directly.

That leaves readers — particularly anyone upgrading directly from 13.0 to 13.2 — without enough detail to actually migrate. This PR expands the section into a full migration guide.

Changes

In src/frontend/src/content/docs/whats-new/aspire-13-2.mdx (### Connection property suffix):

  • Replace the one-sentence stub with an explanation of the rename pattern: properties whose value is the name of a sub-entity now end with Name.
  • Add a canonical table grouped by rename, covering all 15 affected resource types:
    • DatabaseDatabaseName across the 10 SQL/NoSQL/Azure database resources.
    • ModelModelName for AzureOpenAIDeploymentResource, OpenAIModelResource, GitHubModelResource, and FoundryDeploymentResource.
    • ConsumerGroupConsumerGroupName for AzureEventHubConsumerGroupResource.
  • Add before/after environment variable examples (Postgres APPDB_DATABASEAPPDB_DATABASENAME, OpenAI CHAT_MODELCHAT_MODELNAME, Event Hubs ORDERS_CG_CONSUMERGROUPORDERS_CG_CONSUMERGROUPNAME).
  • Add before/after C# AppHost examples for GetConnectionProperty(...) callers.
  • Add a migration checklist ("Identify affected code") covering AppHost calls, env-var consumers in Python/JS/Go apps, and custom Bicep/Helm templates — plus a positive note that C# apps using the standard Aspire client integrations don't need source changes.
  • Add a <Aside type="note"> that cross-links to the partial table on the 13.1 page and clarifies that apps already on 13.1.x use the new names today.

The heading text is unchanged so the anchor #connection-property-suffix remains stable for external links.

Evidence the issue still reproduces

Verified against the live site at https://aspire.dev/whats-new/aspire-13-2/#connection-property-suffix on the day this PR was opened. The Connection property suffix section under ⚠️ Breaking changes renders only the single sentence quoted in the Summary, with no table, no code samples, and no migration steps — in contrast to the AIFoundry to Foundry transition section immediately below it, which has prose, an XML snippet, and a C# migration example.

The screenshot used for verification is in the session workspace (live-stub.png) and shows the rendered section.

Sources for the rename table

The renames in the table are confirmed against the current microsoft/aspire main:

  • Database → DatabaseName is yielded from GetConnectionProperties() in src/Aspire.Hosting.PostgreSQL/PostgresDatabaseResource.cs, src/Aspire.Hosting.MySql/MySqlDatabaseResource.cs, src/Aspire.Hosting.SqlServer/SqlServerDatabaseResource.cs, src/Aspire.Hosting.Oracle/OracleDatabaseResource.cs, src/Aspire.Hosting.MongoDB/MongoDBDatabaseResource.cs, src/Aspire.Hosting.Milvus/MilvusDatabaseResource.cs, src/Aspire.Hosting.Azure.Sql/AzureSqlDatabaseResource.cs, src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBDatabaseResource.cs, src/Aspire.Hosting.Azure.PostgreSQL/AzurePostgresFlexibleServerDatabaseResource.cs, and src/Aspire.Hosting.Azure.Kusto/AzureKustoReadWriteDatabaseResource.cs.
  • Model → ModelName in src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIDeploymentResource.cs, src/Aspire.Hosting.OpenAI/OpenAIModelResource.cs, src/Aspire.Hosting.GitHub.Models/GitHubModelResource.cs, and src/Aspire.Hosting.Foundry/FoundryDeploymentResource.cs.
  • ConsumerGroup → ConsumerGroupName in src/Aspire.Hosting.Azure.EventHubs/AzureEventHubConsumerGroupResource.cs.

The rename first shipped in 13.1.0 via microsoft/aspire#13471 (commit ff437b1f7 on main, backport d6668f526 to release/13.1). The 13.2 changelog calls it out separately for the benefit of apps that skip 13.1.

The environment-variable projection rule ([RESOURCE]_[PROPERTY] uppercased, hyphens and dots replaced with underscores) is implemented in SplatConnectionProperties and EnvironmentVariableNameEncoder.Encode in microsoft/aspire.

The AuthenticationDatabase → AuthenticationDatabaseName and Organization → OrganizationName renames mentioned in PR #13471's description are intentionally not listed in the table — those keys are still emitted unchanged on main (MongoDBServerResource.cs still yields "AuthenticationDatabase"; GitHubModelResource.cs still yields "Organization").

How I verified

  1. Re-read the issue body and the live whats-new/aspire-13-2 page with Playwright to confirm the breaking-change section is still a stub.
  2. Grepped microsoft/aspire main for every "DatabaseName", "ModelName", and "ConsumerGroupName" GetConnectionProperties() yield site to confirm the rename table.
  3. Confirmed the WithEnvironment(string, ReferenceExpression), GetConnectionProperty(IResourceWithConnectionString, string), and ReferenceEnvironmentInjectionFlags.ConnectionProperties API surface used in the new code samples is still public on main.
  4. Verified the cross-reference link /whats-new/aspire-13-1/#connection-properties-rename resolves: the heading exists at src/frontend/src/content/docs/whats-new/aspire-13-1.mdx:579 (### Connection Properties rename) and slugifies to that anchor.
  5. Kept the heading text Connection property suffix unchanged so #connection-property-suffix continues to resolve.

To reproduce locally:

gh issue view 413 --repo microsoft/aspire.dev
git fetch upstream
git checkout dapine/connection-property-suffix-413
cd src/frontend
npm install
npm run dev
# Open http://localhost:4321/whats-new/aspire-13-2/#connection-property-suffix

Scope and out-of-scope

  • Touches only src/frontend/src/content/docs/whats-new/aspire-13-2.mdx.
  • The partial table in whats-new/aspire-13-1.mdx is intentionally left as-is; the 13.2 page is now the canonical reference. A follow-up could optionally cross-link or expand the 13.1 table — happy to do that in this PR if reviewers prefer.
  • The Japanese translation (ja/whats-new/aspire-13-2.mdx) is left to the regular translation workflow.
  • The product-repo spec docs/specs/connection-properties.md in microsoft/aspire still uses the old key names. That's outside this docs PR's scope.

…gration guidance

The 13.2 `Connection property suffix` breaking change was only a single
sentence on the live changelog, which left readers without enough detail
to confidently migrate apps upgrading directly from 13.0 to 13.2.

Expand the section with:

- A short explanation of the rename pattern (properties whose value is the
  name of a sub-entity now end with `Name`).
- A canonical table covering all 15 affected resource types grouped by
  rename (`Database` -> `DatabaseName`, `Model` -> `ModelName`,
  `ConsumerGroup` -> `ConsumerGroupName`).
- Before/after environment-variable examples showing the impact on
  consuming apps that read connection properties through `WithReference`.
- Before/after C# examples for `GetConnectionProperty` callers in the
  AppHost.
- A migration checklist for searching solutions, including a clear note
  that C# apps consuming the standard Aspire client integrations do not
  need source changes.
- Cross-link to the partial 13.1 changelog entry, with the 13.2 entry as
  the canonical reference.

Anchor `#connection-property-suffix` is preserved so external links
keep working.

Fixes #413

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.

[13.2 Docs] Add migration guidance for Connection Property Suffix breaking change

1 participant