Repository navigation
Use supported Cosmos emulator API in consumers - #19837
Conversation
Co-authored-by: Copilot App <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19837Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19837" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBExtensionsTests.cs — This test now exercises RunAsEmulator, but its name still identifies the obsolete… |
What changed in this PR
Replaces obsolete Cosmos emulator API usage in active consumers.
Changes:
- Uses
RunAsEmulatorin the Azure hosting test and Cosmos playground. - Preserves the explicit obsolete-API compatibility test.
| File | Description |
|---|---|
tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBExtensionsTests.cs |
Updates emulator test usage. |
playground/CosmosEndToEnd/CosmosEndToEnd.AppHost/AppHost.cs |
Updates the playground AppHost API call. |
Tests selector3 / 99 PR test projects · 0 PR jobs · 0 advisory-only targets, from 2 changed files. Selected PR test projects (3 / 99)
Selected PR jobs (0)none Advisory workflow impact (0)none How these were chosen — grouped by what changed🧪 📄 Job reasonsnone Selection computed for commit |
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: None
Issues resolved since last review (1)
| Severity | Finding |
|---|---|
tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBExtensionsTests.cs — This test now exercises RunAsEmulator, but its name still identifies the obsolete… View resolved comment |
|
✅ No documentation update needed. Step 5 branch:
|

Description
Main CI and deployment end-to-end builds are blocked because warnings are treated as errors and two consumers still call the obsolete
RunAsPreviewEmulatorAPI.This replaces those calls with the supported
RunAsEmulatorAPI in the Azure Cosmos hosting test and the Cosmos end-to-end playground AppHost. The intentional obsolete-API compatibility test remains unchanged.Validation:
MSBUILDTERMINALLOGGER=false dotnet build playground/CosmosEndToEnd/CosmosEndToEnd.AppHost/CosmosEndToEnd.AppHost.csproj --no-restoreMSBUILDTERMINALLOGGER=false dotnet test --project tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj --no-launch-profile -- --filter-method "*.RunAsPreviewEmulatorAppliesOtlpExporterAnnotation" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?