Skip to content

Add --disableProductStyleUrl to Azurite emulator args#14855

Merged
eerhardt merged 1 commit intodotnet:release/13.2from
eerhardt:Fix14044
Mar 2, 2026
Merged

Add --disableProductStyleUrl to Azurite emulator args#14855
eerhardt merged 1 commit intodotnet:release/13.2from
eerhardt:Fix14044

Conversation

@eerhardt
Copy link
Member

@eerhardt eerhardt commented Mar 2, 2026

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

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
@eerhardt eerhardt requested review from Copilot and danegsta March 2, 2026 21:56
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14855

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14855"

Copy link
Contributor

Copilot AI left a 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 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 --disableProductStyleUrl to the default Azurite argument list used by RunAsEmulator.
  • 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.

@radical
Copy link
Member

radical commented Mar 2, 2026

Should we have a test to confirm that the result is the expected kind of urls?

@eerhardt
Copy link
Member Author

eerhardt commented Mar 2, 2026

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.

@eerhardt eerhardt merged commit 02a4294 into dotnet:release/13.2 Mar 2, 2026
351 checks passed
@eerhardt eerhardt deleted the Fix14044 branch March 2, 2026 23:23
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 2, 2026
mitchdenny pushed a commit that referenced this pull request Mar 5, 2026
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
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants