Repository navigation
Mark WithAzdResourceNaming obsolete - #21230
Mitch Denny (mitchdenny) wants to merge 3 commits into
Conversation
Preserve AZD resource naming behavior while directing callers to deployment retirement guidance. Co-authored-by: Copilot App <[email protected]> Copilot-Session: a4666b12-0d85-44e0-b8fa-7fce0c6de8e3
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21230Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21230" |
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot App <[email protected]> Copilot-Session: a4666b12-0d85-44e0-b8fa-7fce0c6de8e3
Co-authored-by: Copilot App <[email protected]> Copilot-Session: a4666b12-0d85-44e0-b8fa-7fce0c6de8e3
There was a problem hiding this comment.
🔵 Needs a closer look
The stated pre-merge retirement-link dependency still needs direct confirmation.
1 open issue
What changed in this PR
Begins azd deployment retirement by deprecating WithAzdResourceNaming() while preserving naming behavior and its polyglot export.
Changes:
- Adds an obsolete warning and retirement guidance to API remarks.
- Tests warning metadata and narrowly suppresses warnings in compatibility tests.
| File | Description |
|---|---|
| tests/Aspire.Hosting.Azure.Tests/AzureContainerAppsTests.cs | Tests deprecation metadata and preserves naming coverage. |
| tests/Aspire.Hosting.Azure.Tests/AzureContainerAppEnvironmentExtensionsTests.cs | Suppresses the warning in an existing compatibility test. |
| src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppExtensions.cs | Adds the obsolete attribute and retirement guidance. |
Review effort: Balanced
| /// <see href="https://aka.ms/aspire/azd-deployment-retirement"/> for more information. | ||
| /// </para> | ||
| /// </remarks> | ||
| [Obsolete("Azure Developer CLI (azd) deployment support is being retired. See https://aka.ms/aspire/azd-deployment-retirement for more information.")] |
Tests selector8 / 99 PR test projects · 2 PR jobs, from 3 changed files. Selected PR test projects (8 / 99)
Selected PR jobs (2)
How these were chosen — grouped by what changed🔧 🧪 🧪 Job reasons
Selection computed for commit |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Eric Erhardt (eerhardt)
left a comment
There was a problem hiding this comment.
This method is meant for people who were originally using azd to deploy, but have been with us since the beginning. They might not want their resource names to change and have to redeploy. But I guess they can suppress the warning if they want to get unblocked.
| } | ||
|
|
||
| [Fact] | ||
| public void WithAzdResourceNamingIsObsoleteWithTransitionGuidance() |
There was a problem hiding this comment.
I'm not sure we need this test.
|
Closing because after consideration around what Eric said, even if folks don't deploy with AZD they may still want this. |

Description
Recommend that users who deploy Aspire AppHosts using Azure Developer CLI (azd) transition to
aspire deploy. MarkWithAzdResourceNaming()obsolete with a compiler warning linking to https://aka.ms/aspire/azd-transition, and include the same recommendation in the API remarks.Azure Developer CLI is not being retired. Neither are
azd up,azd provision, orazd deploy. This recommendation is specifically for deploying Aspire AppHosts.Existing naming behavior and the polyglot export are intentionally preserved: this change does not rename deployed resources, remove the generated SDK capability, or disable AZD deployment. Other AZD compatibility code is unchanged. Existing compatibility tests retain narrowly scoped obsolete-warning suppressions, and a new test verifies the warning metadata and transition guidance.
Dependency before merge: configure https://aka.ms/aspire/azd-transition to point to the transition guidance. At implementation time it redirects to Bing rather than a transition document.
User-facing usage
Existing C# calls continue to work but now produce warning CS0618:
Warning message:
Breaking changes
Callers using warnings-as-errors must address or explicitly suppress the new obsolete warning. Runtime behavior and generated resource names remain unchanged. Follow the linked transition guidance before changing naming settings on existing deployments.
Validation
./restore.sh— passed, zero warnings and errors.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?