[release/13.5] Hide Azure environment when all resources use emulators - #19998
Conversation
Hide the unused azure-environment resource when the completed run-mode model contains no Azure resources requiring provisioning. Keep it visible for mixed emulator/cloud models. (cherry picked from commit efbfe18) Resolve the test-file conflict by preserving release/13.5's Cosmos DB preview-emulator warning suppression alongside the new Azure environment warning suppression. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19998Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19998" |
There was a problem hiding this comment.
🟡 Changes recommended
An existing HiddenOnCompletion annotation prevents the environment from being hidden in an emulator-only model.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Backports the Azure emulator-only dashboard visibility fix to release/13.5.
Changes:
- Hides the unused Azure environment in emulator-only run models.
- Adds emulator-only and mixed cloud/emulator regression tests.
File summaries
| File | Description |
|---|---|
src/Aspire.Hosting.Azure/AzureResourcePreparer.cs |
Applies hidden-resource metadata when provisioning is unnecessary. |
tests/Aspire.Hosting.Azure.Tests/AzureRunAsEmulatorModeTests.cs |
Tests hidden and visible environment scenarios. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
|
Hmm checks weren't triggered for some reason cc Ankit Jain (@radical). Closing and reopening to trigger them. |
Tests selector (audit mode)The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement. 11 / 100 test projects · 3 jobs, from 2 changed files. Selected test projects (11 / 100)
Selected jobs (3)
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. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
afc289f
into
release/13.5
|
✅ No documentation update needed. Step 5 branch taken: This PR is a backport and is out of scope for docs generation, overriding the
No documentation PR was drafted. |
Description
Backport of #19843 to
release/13.5.Emulator-only AppHosts currently show an unused
azure-environmentresource stuck in Not started. This backport hides that resource when no Azure resources require provisioning, while keeping it visible for mixed emulator/cloud models.Cherry-picks main commit
efbfe185b7a8c99536661768b3fa9bddd07f332b. The test-file conflict was resolved by retaining the release branch'sASPIRECOSMOSDB001suppression alongside the newASPIREAZURE001suppression. ExistingRunAsPreviewEmulatorcoverage is unchanged.User-facing usage
Existing emulator-only AppHosts require no changes:
The dashboard omits
azure-environmentfor this model. Adding an Azure resource that requires provisioning keeps it visible.Fixes #19617
Checklist
<remarks />and<code />elements on your triple slash comments?Customer Impact
AppHosts using only local Azure emulators display a misleading
azure-environmentresource in Not started, even though no Azure provisioning is needed. This removes that dashboard noise without hiding the environment when cloud provisioning is required.Testing
All 44 tests in
AzureRunAsEmulatorModeTestsandAzureResourcePreparerTestspassed onrelease/13.5, including both backported test cases. Quarantined and outerloop tests were excluded.Risk
Low. The change only adds a hidden annotation in run mode when there are no provisionable Azure resources; cloud provisioning and publish behavior are unchanged. No public API changes.
Regression?
Sort of. User experience changed for the worse. Per the triage on #19617; this addresses existing cosmetic dashboard behavior.