Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content for .NET Aspire 9.1 #2566

Merged
merged 63 commits into from
Feb 25, 2025
Merged
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
823b8e1
Update docs/serverless/functions.md
captainsafia Feb 6, 2025
2eca627
Update Azure Service Bus integration doc (#2365)
IEvangelist Feb 11, 2025
1f0c8b9
Resource notifications (#2568)
IEvangelist Feb 11, 2025
239ffb9
Fixes breaking changes doc issues (#2619)
IEvangelist Feb 13, 2025
099de3b
Shell for what's new content (#2620)
IEvangelist Feb 13, 2025
42588f9
Fixes #1659 (#2621)
IEvangelist Feb 14, 2025
714e36b
Rewritten Azure Event Hubs integration content (#2562)
IEvangelist Feb 14, 2025
8a1e2dc
Upgrade bits to 9.1 (#2627)
IEvangelist Feb 14, 2025
78c6213
[9.1] Force waiting resource to start (#2629)
JamesNK Feb 18, 2025
e494772
[9.1] Add WithExplicitStart (#2630)
JamesNK Feb 18, 2025
4526acd
Add DOTNET_DASHBOARD_CORS_ALLOWED_ORIGINS to app host configuration (…
JamesNK Feb 18, 2025
7025f43
Fix invalid file link warning (#2635)
IEvangelist Feb 18, 2025
8d2a907
[9.1] Add resource relationship docs (#2637)
JamesNK Feb 19, 2025
ca2baf7
Wat's new (#2622)
maddymontaquila Feb 19, 2025
b440c0f
Version-suffixed NuGet client integrations (#2643)
IEvangelist Feb 20, 2025
729d1f6
[9.1] Add remove logs and telemetry to what's new (#2645)
JamesNK Feb 20, 2025
aafa5b2
Adds the NATS 9.1 API and fixes obsolete API. (#2650)
IEvangelist Feb 20, 2025
18a633c
A bit of clean up
IEvangelist Feb 20, 2025
c31d324
Update breaking changes docs (#2651)
eerhardt Feb 21, 2025
ef77628
Existing Azure resources (#2653)
IEvangelist Feb 21, 2025
5699f36
Add docs for CosmosDB preview emulator (#2654)
eerhardt Feb 21, 2025
4389b22
Apply suggestions from code review
IEvangelist Feb 21, 2025
b8dd676
Fixed misc feedback
IEvangelist Feb 21, 2025
e059b8d
Merge branch 'main' into dotnet-aspire-9.1
IEvangelist Feb 21, 2025
868ab7b
Fix heading link
IEvangelist Feb 21, 2025
3334853
.NET Aspire and GitHub Codespaces/Devcontainers (#2638)
mitchdenny Feb 21, 2025
c5df5b0
Codespaces and dev containers (#2655)
IEvangelist Feb 22, 2025
73cc5e1
Update CosmosDB, EventHubs, and ServiceBus for latest APIs. (#2656)
eerhardt Feb 22, 2025
ad1f55a
Update devcontainer.
mitchdenny Feb 24, 2025
5da14ed
Bicep too.
mitchdenny Feb 24, 2025
ec1803f
Merge pull request #2664 from dotnet/remove-azure-features-from-devco…
mitchdenny Feb 24, 2025
215bf7f
Add CosmosDB container creation (#2661)
sebastienros Feb 24, 2025
49f5deb
Enhance Integrations What's New in 9.1 (#2657)
eerhardt Feb 24, 2025
a1443b9
Local-devcontainers (#2662)
mitchdenny Feb 24, 2025
4c982b6
Edit pass and clean up
IEvangelist Feb 24, 2025
e4284e1
Clean up images
IEvangelist Feb 24, 2025
c9dff1d
Add link from setup to codespaces and dev containers
IEvangelist Feb 24, 2025
7ba8543
Another edit pass
IEvangelist Feb 24, 2025
2ac133a
Remove misleading links
IEvangelist Feb 24, 2025
9fd1037
Remove details/summary HTML - usability concerns
IEvangelist Feb 24, 2025
06d196f
Fix triple : code bits
IEvangelist Feb 24, 2025
30b7b1c
Move Upgrade to 9.1 to the top (#2668)
eerhardt Feb 24, 2025
23ad1b9
Add testing overview doc (#2667)
ReubenBond Feb 24, 2025
c72b5ea
Edit pass on testing docs
IEvangelist Feb 24, 2025
5c60d51
Clean builds, except xref
IEvangelist Feb 24, 2025
cdf3d40
Add code snippet for using new Azure emulators
eerhardt Feb 24, 2025
ffca71f
fixup
eerhardt Feb 24, 2025
b45cdc5
Merge pull request #2669 from dotnet/EmulatorCode
eerhardt Feb 24, 2025
f819db2
Tweak the wording of CosmosDB databases and containers (#2670)
eerhardt Feb 25, 2025
4f73fe4
Another edit pass
IEvangelist Feb 25, 2025
eb5ad3a
Fix typo
IEvangelist Feb 25, 2025
2c47d3f
Adjust h2s
IEvangelist Feb 25, 2025
e9b7102
Fix bookmark
IEvangelist Feb 25, 2025
c5e5436
Clean up, additions, and removal of mistakenly dup'd content
IEvangelist Feb 25, 2025
f1b5914
More rewording and messaging updates
IEvangelist Feb 25, 2025
41c0d25
More rewording and messaging updates
IEvangelist Feb 25, 2025
aa8883f
Additional details
IEvangelist Feb 25, 2025
41ff3ad
Headings
IEvangelist Feb 25, 2025
546622d
Add more links, clarify text, and use ref branch
IEvangelist Feb 25, 2025
8017cd5
Add breaking changes link
IEvangelist Feb 25, 2025
a63d996
A few xref bits for fun
IEvangelist Feb 25, 2025
971aa4e
Point to .NET Aspire 9.1 API docs
IEvangelist Feb 25, 2025
bbed52e
Remove a few things
IEvangelist Feb 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes breaking changes doc issues (#2619)
* Fixes breaking changes doc issues

* Fix links

* Correct front-matter

* Add index
  • Loading branch information
IEvangelist committed Feb 19, 2025
commit 239ffb932de96b2e388fa77216b688371d920af4
1 change: 0 additions & 1 deletion docs/compatibility/9.0/index.md
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@ If you're migrating an app to .NET 9, the breaking changes listed here might aff
[!INCLUDE [binary-source-behavioral](../includes/binary-source-behavioral.md)]

> [!NOTE]
>
> This article is a work in progress. It's not a complete list of breaking changes in .NET Aspire 9.

## Breaking changes
49 changes: 49 additions & 0 deletions docs/compatibility/9.1/container-image-name-and-tag-updates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Default container image name and tag changed
description: Default container image name and tag changes in .NET Aspire 9.1 for AddDockerfile and WithDockerfile methods.
ms.date: 02/13/2025
ai-usage: ai-assisted
ms.custom: https://github.com/dotnet/docs-aspire/issues/2557
---

# Default container image name and tag changed

In .NET Aspire 9.1, the default container image name and tag assigned to the container resource when using <xref:Aspire.Hosting.ContainerResourceBuilderExtensions.AddDockerfile*> or <xref:Aspire.Hosting.ContainerResourceBuilderExtensions.WithDockerfile*> changed. This change affects how container images are named and tagged by default, improving consistency and safety.

## Version introduced

.NET Aspire 9.1

## Previous behavior

In .NET Aspire 9.0:

- The default container image name used was based on this format: `{ResourceName}-image-{HashOfAppHostDirectory}`
- The default container tag used was simply `latest`

## New behavior

In .NET Aspire 9.1:

- The default container image name used is now simply the resource name lowercased.
- The default container tag used is now a hash derived from the app host directory combined with a timestamp of when the method was called.

## Type of breaking change

This change is a [behavioral change](../categories.md#behavioral-change).

## Reason for change

The previous behavior led to [a bug](https://github.com/dotnet/aspire/issues/7462). The resource name wasn't properly sanitized, resulting in unsafe, and unfriendly container image names. Additionally, tagging all images as `latest` made it difficult to manage and roll back deployments.

## Recommended action

Users should update any deployment tools, scripts, and processes to accommodate the new image names and tags.

> [!NOTE]
> The default image name and tag can be overridden by calling <xref:Aspire.Hosting.ContainerResourceBuilderExtensions.WithImage*> and <xref:Aspire.Hosting.ContainerResourceBuilderExtensions.WithImageTag*> on the `IResourceBuilder<ContainerResource>` respectively.

## Affected APIs

- <xref:Aspire.Hosting.ContainerResourceBuilderExtensions.AddDockerfile*>
- <xref:Aspire.Hosting.ContainerResourceBuilderExtensions.WithDockerfile*>
55 changes: 55 additions & 0 deletions docs/compatibility/9.1/cosmos-db-obsolete-apis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: Cosmos DB hosting integration obsolete API and default managed identity support
description: Breaking changes in Aspire.Hosting.Azure.CosmosDB regarding obsolete methods and default managed identity support.
ms.date: 02/13/2025
ai-usage: ai-assisted
ms.custom: https://github.com/dotnet/docs-aspire/issues/2428
---

# Cosmos DB hosting integration obsolete API and default managed identity support

In .NET Aspire 9.1, the `AddDatabase()` method is obsolete and replaced by `WithDatabase()`. Additionally, `AddAzureCosmosDB()` now uses Managed Identity by default during provisioning instead of creating a Key Vault instance with a random access key.

## Version introduced

.NET Aspire 9.1

## Previous behavior

Previously, the `AddDatabase()` method was used to add a database. The `AddAzureCosmosDB()` method created a Key Vault instance with a random access key by default.

## New behavior

The `AddDatabase()` method is now obsolete and replaced by `WithDatabase()`. Consider the following example that uses the new API:

```csharp
var builder = DistributedApplication.CreateBuilder(args);

var cosmosdb = builder.AddAzureCosmosDB("cosmos")
.WithDatabase("database");
```

The `AddAzureCosmosDB()` method now uses Managed Identity by default. To revert to the previous behavior's use of key-based authentication, call `WithAccessKeyAuthentication()`:

```csharp
var builder = DistributedApplication.CreateBuilder(args);

var cosmosdb = builder.AddAzureCosmosDB("cosmos")
.WithAccessKeyAuthentication();
```

## Type of breaking change

This change is a [source incompatible](../categories.md#source-compatibility) and [behavioral change](../categories.md#behavioral-change).

## Reason for change

The change follows the new API pattern when an existing resource is returned instead of a new resource (`Add` vs `With`). It also enhances security by using token credentials instead of secrets in connection strings. For more information, see [Add support for managed identity in Azure Cosmos DB hosting component](https://github.com/dotnet/aspire/pull/7092).

## Recommended action

Use `WithDatabase()` instead of `AddDatabase()`. Update applications to use token credentials instead of secrets in connection strings.

## Affected APIs

- `Aspire.Hosting.AzureCosmosExtensions.AddDatabase`
25 changes: 25 additions & 0 deletions docs/compatibility/9.1/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Breaking changes in .NET Aspire 9.1
titleSuffix: ""
description: Navigate to the breaking changes in .NET Aspire 9.1.
ms.date: 02/13/2025
---

# Breaking changes in .NET Aspire 9.1

If you're migrating an app to .NET Aspire 9.1, the breaking changes listed here might affect you.

[!INCLUDE [binary-source-behavioral](../includes/binary-source-behavioral.md)]

> [!NOTE]
> This article is a work in progress. It's not a complete list of breaking changes in .NET Aspire 9.1.

## Breaking changes

| Title | Type of change | Introduced version |
|--|--|--|
| [Default container image name and tag changed](container-image-name-and-tag-updates.md) | Behavioral change | .NET Aspire 9.1 |
| [Cosmos DB hosting integration obsolete API and default managed identity support](cosmos-db-obsolete-apis.md) | Source incompatible, behavioral change | .NET Aspire 9.1 |
| [Python hosting integration parameter name changes](python-hosting-integration-api-changes.md) | Source incompatible | .NET Aspire 9.1 |
| [Azure Service Bus hosting integration obsolete APIs](service-bus-obsolete-apis.md) | Source incompatible | .NET Aspire 9.1 |
| [IDistributedApplicationTestingBuilder API changes](testing-builder-api-changes.md) | Binary incompatible | .NET Aspire 9.1 |
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Python hosting integration parameter name changes
description: Update parameter names in Python hosting integration preview for Aspire to refer to apps instead of projects.
ms.date: 02/13/2025
ai-usage: ai-assisted
ms.custom: https://github.com/dotnet/docs-aspire/issues/2559
---

# Python hosting integration parameter name changes

In .NET Aspire 9.1, the Python hosting integration preview updates parameter names to refer to Python apps instead of projects. This change ensures consistent naming across the API.

## Version introduced

.NET Aspire 9.1

## Previous behavior

Some parameter names on methods and constructors in the Python hosting integration preview for .NET Aspire referred to the Python app as a `project` rather than an `app`.

## New behavior

Parameter names on methods and constructors in the Python hosting integration preview for .NET Aspire now refer to the Python app as an `app` instead of `project` where applicable.

## Type of breaking change

This change is a [source incompatible](../categories.md#source-compatibility).

## Reason for change

The change ensures consistent naming across the API.

## Recommended action

Update application source as appropriate to use the new parameter names.

## Affected APIs

- <xref:Aspire.Hosting.PythonAppResourceBuilderExtensions.AddPythonApp*>
- <xref:Aspire.Hosting.Python.PythonAppResource>
76 changes: 76 additions & 0 deletions docs/compatibility/9.1/service-bus-obsolete-apis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
title: Azure Service Bus hosting integration obsolete APIs
description: Methods AddQueue, AddTopic, and AddSubscription are being obsoleted in Azure.Hosting.ServiceBus.
ms.date: 02/13/2025
ai-usage: ai-assisted
ms.custom: https://github.com/dotnet/docs-aspire/issues/2327
---

# Azure Service Bus hosting integration obsolete APIs

In .NET Aspire 9.1, the methods `AddQueue`, `AddTopic`, and `AddSubscription` are being obsoleted. This change introduces new methods that better reflect the intended usage and improve the API's clarity.

## Version introduced

.NET Aspire 9.1

## Previous behavior

Previously, the methods `AddQueue`, `AddTopic`, and `AddSubscription` were used to add resources to the Azure Service Bus.

```csharp
var builder = DistributedApplication.CreateBuilder(args);

var serviceBus = builder.AddAzureServiceBus("messaging");

serviceBus.AddQueue("queueName");
serviceBus.AddTopic("topicName");
serviceBus.AddSubscription("topicName", "subscriptionName");
```

## New behavior

The new methods use the `With` prefix to indicate that no specific resource is created, aligning with the intended usage.

```csharp
var builder = DistributedApplication.CreateBuilder(args);

var serviceBus = builder.AddAzureServiceBus("messaging");

serviceBus.WithQueue(
name: "queueName",
configure: (ServiceBusQueue queue) => { /* configure queue */ });

serviceBus.WithTopic(
name: "topicName",
configure: (ServiceBusTopic topic) => { /* configure topic */ });
```

The `configure` parameter is optional. If not provided, the default configuration is used.

## Type of breaking change

This change is a [source incompatible](../categories.md#source-compatibility).

## Reason for change

A better API is provided, as the names `With` reflect that no specific resource is created. `Add` should be used when it returns an actual resource (not a resource builder). For more information, see [Add Service Bus emulator support](https://github.com/dotnet/aspire/pull/6737).

## Recommended action

Replace any usage of the obsolete methods with the new methods.

```csharp
var builder = DistributedApplication.CreateBuilder(args);

var serviceBus = builder.AddAzureServiceBus("messaging");

serviceBus.WithQueue("queueName");
serviceBus.WithTopic("topicName");
```

## Affected APIs

- `Aspire.Hosting.AzureServiceBusExtensions.AddQueue`
- `Aspire.Hosting.AzureServiceBusExtensions.AddTopic`
- `Aspire.Hosting.AzureServiceBusExtensions.AddSubscription`
39 changes: 39 additions & 0 deletions docs/compatibility/9.1/testing-builder-api-changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: IDistributedApplicationTestingBuilder API changes
description: "IDistributedApplicationTestingBuilder now inherits from IDistributedApplicationBuilder, IAsyncDisposable, and IDisposable."
ms.date: 2/13/2025
ai-usage: ai-assisted
ms.custom: https://github.com/dotnet/docs-aspire/issues/2616
---

# IDistributedApplicationTestingBuilder API changes

In .NET Aspire 9.1, <xref:Aspire.Hosting.Testing.IDistributedApplicationTestingBuilder> was changed to inherit from <xref:Aspire.Hosting.IDistributedApplicationBuilder>, <xref:System.IAsyncDisposable>, and <xref:System.IDisposable>. This change affects binary compatibility and requires recompilation of existing binaries.

## Version introduced

.NET Aspire 9.1

## Previous behavior

Previously, `IDistributedApplicationTestingBuilder` inherited from nothing.

## New behavior

`IDistributedApplicationTestingBuilder` now inherits from `IDistributedApplicationBuilder`, `IAsyncDisposable`, and `IDisposable`.

## Type of breaking change

This change is a [binary incompatible](../categories.md#binary-compatibility) change.

## Reason for change

Methods accepting a parameter of type `IDistributedApplicationBuilder` now work with `IDistributedApplicationTestingBuilder`, giving developers a consistent API surface.

## Recommended action

Recompile your code if necessary. If you're implementing `IDistributedApplicationTestingBuilder` yourself (which would be highly unusual), then you need to implement the new interfaces also.

## Affected APIs

- `IDistributedApplicationTestingBuilder`
10 changes: 10 additions & 0 deletions docs/compatibility/categories.md
Original file line number Diff line number Diff line change
@@ -23,24 +23,34 @@ When behavioral changes are externally visible and modify a type's public contra

## Binary compatibility

<span id="binary-incompatible"></span>

Binary compatibility refers to the ability of a consumer of an API to use the API on a newer version without recompilation. Changes such as adding methods or adding a new interface implementation to a type do not affect binary compatibility. However, removing or altering an assembly's public signatures so that consumers can no longer access the same interface exposed by the assembly does affect binary compatibility. A change of this kind is termed a *binary incompatible change*.

## Source compatibility

<span id="source-incompatible"></span>

Source compatibility refers to the ability of existing consumers of an API to recompile against a newer version without any source changes. A *source incompatible change* occurs when a consumer needs to modify source code for it to build successfully against a newer version of an API.

## Design-time compatibility

<span id="design-time-incompatible"></span>

Design-time compatibility refers to preserving the design-time experience across versions of Visual Studio and other design-time environments. While this can involve the behavior or the UI of designers, the most important aspect of design-time compatibility concerns project compatibility. A project or solution must be able to be opened and used on a newer version of the design-time environment.

## Backwards compatibility

<span id="backward-incompatible"></span>

Backwards compatibility refers to the ability of an existing consumer of an API to run against a new version while behaving in the same way. Both behavioral changes and changes in binary compatibility affect backwards compatibility. If a consumer is not able to run or behaves differently when running against the newer version of the API, the API is *backwards incompatible*.

Changes that affect backwards compatibility are discouraged, since developers expect backwards compatibility in newer versions of an API.

## Forward compatibility

<span id="forward-incompatible"></span>

Forward compatibility refers to the ability of an existing consumer of an API to run against an older version while exhibiting the same behavior. If a consumer is not able to run or behaves differently when run against an older version of the API, the API is *forward incompatible*.

Maintaining forward compatibility virtually precludes any changes or additions from version to version, since those changes prevent a consumer that targets a later version from running under an earlier version. Developers expect that a consumer that relies on a newer API may not function correctly against the older API.
21 changes: 19 additions & 2 deletions docs/compatibility/toc.yml
Original file line number Diff line number Diff line change
@@ -5,8 +5,25 @@ items:
href: ../get-started/aspire-overview.md
- name: Breaking changes
href: breaking-changes.md
- name: .NET Aspire 9.0
- name: .NET Aspire 9.1
expanded: true
items:
- name: Overview
href: 9.1/index.md
- name: Breaking changes in 9.1
expanded: true
items:
- name: Container image name and tag updates
href: 9.1/container-image-name-and-tag-updates.md
- name: Cosmos DB hosting integration obsolete API and default managed identity support
href: 9.1/cosmos-db-obsolete-apis.md
- name: Python hosting integration API changes
href: 9.1/python-hosting-integration-api-changes.md
- name: Service Bus hosting integration obsolete APIs
href: 9.1/service-bus-obsolete-apis.md
- name: Testing builder API changes
href: 9.1/testing-builder-api-changes.md
- name: .NET Aspire 9.0
items:
- name: Overview
href: 9.0/index.md
@@ -17,7 +34,7 @@ items:
href: 9.0/azureopenai-ctor.md
- name: Introduce new Python resource type and APIs changes
href: 9.0/addpython.md
- name: Updates to implicitly named volumes to avoid collisions
- name: Updates to implicitly named volumes to avoid collisions
href: 9.0/unnamed-volumes.md
- name: Make unnamed volumes more unique
href: 9.0/make-unnamed-volumes-unique.md