- Notifications
You must be signed in to change notification settings - Fork807
fix: Use http scheme when using preview emulator#14543
fix: Use http scheme when using preview emulator#14543cliedeman wants to merge 1 commit intodotnet:mainfrom
Conversation
🚀Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh| bash -s -- 14543Or
iex"& {$(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14543" |
cliedeman commentedFeb 18, 2026
@dotnet-policy-service agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull request overview
This pull request fixes issue#13893 where custom CosmosDB preview emulator image tags (e.g.,vnext-EN20251212) were not being recognized as preview emulator instances, causing SSL connection errors. The root cause was that theIsPreviewEmulator property only checked for the exact tagvnext-preview, not other vnext variants. When unrecognized, the system would attempt to use HTTPS connections, but the preview emulator uses HTTP, resulting in SSL/TLS failures.
Changes:
- Extended
IsPreviewEmulatorlogic to recognize all vnext-prefixed tags by adding aStartsWithcheck - Added
TagVNextconstant to centralize the "vnext" tag prefix - Added comprehensive test coverage for multiple tag variants (default, custom dated tag, and explicit vnext-preview)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Aspire.Hosting.Azure.CosmosDB/CosmosDBEmulatorContainerImageTags.cs | AddedTagVNext constant for the "vnext" tag prefix |
| src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBResource.cs | UpdatedIsPreviewEmulator to check for both exact "vnext-preview" match and "vnext" prefix usingStartsWith |
| tests/Aspire.Hosting.Azure.Tests/AzureCosmosDBConnectionPropertiesTests.cs | Added parameterized test covering null (default), custom dated tag, and explicit preview tag scenarios; removed trailing whitespace |
Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes#13893
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: