Skip to content

docs: expand Connection Property Suffix migration guidance for Aspire 13.2 - #1167

Open
David Pine (IEvangelist) with Copilot wants to merge 2 commits into
mainfrom
copilot/add-migration-guidance-connection-suffix
Open

docs: expand Connection Property Suffix migration guidance for Aspire 13.2#1167
David Pine (IEvangelist) with Copilot wants to merge 2 commits into
mainfrom
copilot/add-migration-guidance-connection-suffix

Conversation

Copilot AI commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

The ### Connection property suffix breaking-change entry in whats-new/aspire-13-2.mdx was a single placeholder sentence with no actionable guidance for users upgrading from 13.1.

Changes

  • Expanded the breaking-change section in whats-new/aspire-13-2.mdx to cover microsoft/aspire#13471:
    • Explains why the suffix was added (disambiguates name strings from data objects)
    • Full rename table across all affected resource types:
      • DatabaseDatabaseName — PostgreSQL, SQL Server, MySQL, MongoDB, Oracle, Milvus, Azure Cosmos DB, Azure PostgreSQL Flexible Server, Azure SQL, Azure Data Explorer
      • ModelModelName — Azure AI Foundry, Azure OpenAI, OpenAI, GitHub Models
      • ConsumerGroupConsumerGroupName — Azure Event Hubs consumer groups
    • Before/after environment variable examples showing the concrete variable name change
    • Numbered migration steps (<Steps>) covering: grep search pattern, updating env var reads in consuming apps, and updating GetConnectionProperty() calls in AppHost code

Before/after snapshot:

# Before (Aspire ≤13.1)
MYDB_DATABASE=customers
CHAT_MODEL=gpt-4o-mini

# After (Aspire 13.2)
MYDB_DATABASENAME=customers
CHAT_MODELNAME=gpt-4o-mini
// AppHost — before
worker.WithEnvironment("DB_NAME", mydb.Resource.GetConnectionProperty("Database"));

// AppHost — after
worker.WithEnvironment("DB_NAME", mydb.Resource.GetConnectionProperty("DatabaseName"));

… in 13.2

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copilot AI changed the title [WIP] Add migration guidance for connection property suffix change docs: expand Connection Property Suffix migration guidance for Aspire 13.2 Jun 2, 2026
@IEvangelist
David Pine (IEvangelist) marked this pull request as ready for review June 30, 2026 08:38
Copilot AI review requested due to automatic review settings June 30, 2026 08:38

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.

Pull request overview

Expands the Aspire 13.2 “Connection property suffix” breaking-change entry to give actionable migration guidance for users whose consuming apps or AppHost code reads connection properties/environment variables directly.

Changes:

  • Adds a rename table covering DatabaseDatabaseName, ModelModelName, and ConsumerGroupConsumerGroupName across multiple resource types.
  • Adds before/after environment variable examples to show the concrete injected name changes.
  • Adds step-by-step migration instructions, including guidance for updating GetConnectionProperty() calls.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

### Connection property suffix

A connection property suffix has been added which may require updates to code that accesses connection properties directly.
To make it unambiguous that connection properties like `Database` and `Model` carry *name* strings rather than data objects, Aspire 13.2 adds an explicit `Name` suffix to those properties across all built-in resource types (see [microsoft/aspire#13471](https://github.com/microsoft/aspire/pull/13471)).
1. **Find all reads of the old environment variable names.** Search your consuming apps for the old pattern, for example `_DATABASE`, `_MODEL`, or `_CONSUMERGROUP`:

```bash title="Bash — Finding affected reads"
grep -r "_DATABASE\|_MODEL\|_CONSUMERGROUP" ./src

@adamint Adam Ratzman (adamint) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#944 already merged this surface, so I think this PR should close as superseded rather than be updated. The merged guidance appears to have the same release-boundary and example problems I left inline; those need a follow-up against main.

### Connection property suffix

A connection property suffix has been added which may require updates to code that accesses connection properties directly.
To make it unambiguous that connection properties like `Database` and `Model` carry *name* strings rather than data objects, Aspire 13.2 adds an explicit `Name` suffix to those properties across all built-in resource types (see [microsoft/aspire#13471](https://github.com/microsoft/aspire/pull/13471)).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shipped in 13.1 via backport #13516 (commit d6668f5 is in v13.1.0), so this section is on the wrong release page and the 13.2/≤13.1 boundaries are off by one. Could we move this to the 13.1 page and use ≤13.0/13.1?


| Old property name | New property name | Affected resources |
| --- | --- | --- |
| `Database` | `DatabaseName` | PostgreSQL database, SQL Server database, MySQL database, MongoDB database, Oracle database, Milvus database, Azure Cosmos DB database, Azure PostgreSQL Flexible Server database, Azure SQL database, Azure Data Explorer (Kusto) database |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several Azure resources listed here never shipped with the old unsuffixed names; their connection properties were introduced already suffixed in 13.1. Could we limit the migration table to resources that actually had a released rename?

```

```bash title="Bash — After (Aspire 13.2)"
CHAT_MODELNAME=gpt-4o-mini

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AzureOpenAIDeploymentResource.ModelName resolves to the deployment name, not the underlying model ID, so gpt-4o-mini is misleading here. Could we use a GitHub Models example, or show the actual deployment name?

1. **Find all reads of the old environment variable names.** Search your consuming apps for the old pattern, for example `_DATABASE`, `_MODEL`, or `_CONSUMERGROUP`:

```bash title="Bash — Finding affected reads"
grep -r "_DATABASE\|_MODEL\|_CONSUMERGROUP" ./src

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also matches already-migrated names like _DATABASENAME/_MODELNAME, and it doesn't find the direct GetConnectionProperty("...") calls covered in step 3. Could we anchor the old suffixes and add a second search for those property keys?

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

4 participants