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

Document Azure resource naming breaking change #1666

Closed
eerhardt opened this issue Sep 23, 2024 · 2 comments · Fixed by #1867
Closed

Document Azure resource naming breaking change #1666

eerhardt opened this issue Sep 23, 2024 · 2 comments · Fixed by #1867
Assignees
Labels
docs-experience Indicates issues that are about the learn.microsoft.com experience or design [org][type][category] in-pr okr-freshness OKR: Freshness of content Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest. 📦 release-9.0 Used to track doc updates for release 9.0 of .NET Aspire.
Milestone

Comments

@eerhardt
Copy link
Member

eerhardt commented Sep 23, 2024

In dotnet/aspire#5809, and as part of the move to the new Azure.Provisioning versions, we are making a change to how Azure resources are named.

See dotnet/aspire#5756 for the description of the problem / reasoning for the change.

To revert back to using the .NET Aspire v8 naming scheme, the following code can be added to the beginning of the AppHost's Program.cs:

using Aspire.Hosting.Azure;

var builder = DistributedApplication.CreateBuilder(args);
builder.Services.Configure<AzureProvisioningOptions>(options =>
{
    // insert the v8 naming resolver at the front of the list so it is used to provide resource names
    options.ProvisioningContext.PropertyResolvers.Insert(0, new AspireV8ResourceNamePropertyResolver());
});

@IEvangelist - We could also take this opportunity to document how to use the ProvisioningContext to customize the Azure resources created in an Aspire app. Do you want a separate issue tracking that? or is it OK to reuse this issue?
It would be great if we had a base set of documentation from the Azure SDK we could point to. cc @tg-msft


Associated WorkItem - 330865

@IEvangelist
Copy link
Member

Sounds good, thanks for adding this @eerhardt. I'm curious though, why not have the version be a parameter on the resolver?

using Aspire.Hosting.Azure;

var builder = DistributedApplication.CreateBuilder(args);
builder.Services.Configure<AzureProvisioningOptions>(options =>
{
    // insert the v8 naming resolver at the front of the list so it is used to provide resource names
    options.ProvisioningContext.PropertyResolvers.Insert(
        0,
        new AspireResourceNamePropertyResolver(ResourceNameVersion.V8));
});

Or something like that? AspireV8ResourceNamePropertyResolver just feels so specific. This is for release 9.0, correct?

@eerhardt
Copy link
Member Author

This is for release 9.0, correct?

correct

why not have the version be a parameter on the resolver?

I don't plan on this being a "long lived" class. It was created just to make reverting the breaking change back to help people move to the new version. I don't plan on us having "V9", "V10", etc. versions.

Going forward we are going to use the default Azure.Provisioning behavior. And if there are breaking changes in the naming scheme there, Azure.Provisioning will need to provide the backwards compatibility.

@IEvangelist IEvangelist self-assigned this Oct 24, 2024
@IEvangelist IEvangelist added 🗺️ reQUEST Triggers an issue to be imported into Quest. Pri1 High priority, do before Pri2 and Pri3 docs-experience Indicates issues that are about the learn.microsoft.com experience or design [org][type][category] okr-freshness OKR: Freshness of content 📦 release-9.0 Used to track doc updates for release 9.0 of .NET Aspire. and removed ⌚ Not Triaged Not triaged labels Oct 24, 2024
@IEvangelist IEvangelist added this to the 9.0 milestone Oct 24, 2024
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-experience Indicates issues that are about the learn.microsoft.com experience or design [org][type][category] in-pr okr-freshness OKR: Freshness of content Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest. 📦 release-9.0 Used to track doc updates for release 9.0 of .NET Aspire.
Projects
No open projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

3 participants