Add --disableProductStyleUrl to Azurite emulator args#14855
Add --disableProductStyleUrl to Azurite emulator args#14855eerhardt merged 1 commit intodotnet:release/13.2from
Conversation
Include --disableProductStyleUrl in Azurite command line when running Azure Storage as an emulator. This is necessary because when a Container resource references the Storage emulator it gets a URL like storage.dev.internal:10000. Using a URL like this conflicts between the Storage SDK and the emulator because the Storage SDK sees port 10000 and uses path-style URLs. But the emulator rejects them because it expects "product-style" URLs. Fix dotnet#14044
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14855Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14855" |
There was a problem hiding this comment.
Pull request overview
This PR updates Aspire’s Azure Storage emulator (Azurite) container invocation to include --disableProductStyleUrl, aligning Azurite’s URL parsing with the path-style endpoints produced for container-to-container networking (e.g., storage.dev.internal:10000/...) and addressing issue #14044.
Changes:
- Add
--disableProductStyleUrlto the default Azurite argument list used byRunAsEmulator. - Update Azure Storage emulator tests to assert the new argument is included.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Aspire.Hosting.Azure.Storage/AzureStorageExtensions.cs | Adds --disableProductStyleUrl to Azurite startup args in RunAsEmulator to avoid product-style URL handling. |
| tests/Aspire.Hosting.Azure.Tests/AzureStorageExtensionsTests.cs | Extends assertions to verify --disableProductStyleUrl is present in evaluated Azurite args. |
|
Should we have a test to confirm that the result is the expected kind of urls? |
Those tests already exist. This doesn't change the URL format at all. This only changes the behavior on the Storage emulator to work with the URLs we give it. |
Include --disableProductStyleUrl in Azurite command line when running Azure Storage as an emulator. This is necessary because when a Container resource references the Storage emulator it gets a URL like storage.dev.internal:10000. Using a URL like this conflicts between the Storage SDK and the emulator because the Storage SDK sees port 10000 and uses path-style URLs. But the emulator rejects them because it expects "product-style" URLs. Fix #14044
Include --disableProductStyleUrl in Azurite command line when running Azure Storage as an emulator. This is necessary because when a Container resource references the Storage emulator it gets a URL like storage.dev.internal:10000. Using a URL like this conflicts between the Storage SDK and the emulator because the Storage SDK sees port 10000 and uses path-style URLs. But the emulator rejects them because it expects "product-style" URLs. Fix #14044
Description
Include --disableProductStyleUrl in Azurite command line when running Azure Storage as an emulator. This is necessary because when a Container resource references the Storage emulator it gets a URL like storage.dev.internal:10000. Using a URL like this conflicts between the Storage SDK and the emulator because the Storage SDK sees port 10000 and uses path-style URLs. But the emulator rejects them because it expects "product-style" URLs.
Fix #13811
Fix #14044