Open milkyware opened 1 year ago
Thank you for your feedback. This has been routed to the support team for assistance.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ahmedelnably @fabiocav @xgithubtriage.
Adding Service team to look into this.
@ahmedelnably @fabiocav @xgithubtriage Could you please look into this once you get a chance ? Thanks in advance.
Library name and version
Microsoft.Azure.WebJobs.Extensions.Storage.Blobs 5.1.0
Describe the bug
When using the Blob output binding with capital letters in the path such as
[Blob("Test")] BlobContainerClient containerClient
the error Microsoft.Azure.WebJobs.Host: Validation failed for property 'BlobPath', value 'Test'. The field BlobPath is invalid. occurs. I know that Azure storage only supports lowercase for blob containers. However, when doing the equivalent with queue storage using Microsoft.Azure.WebJobs.Extensions.Storage.Queues 5.1.0 e.g.[Queue("Test")] IAsyncCollector<string> collector
there is no error and the binding auto resolves to a lowercase queue name like below.This seems like inconsistent behaviour. I often use
nameof
when working with queues to avoid magic strings and constants. It would be great to do the same with blob containers.Expected behavior
Capitalised Blob container names are auto-resolved to be lowercase like when using Queue output bindings and creates the container
Actual behavior
Exception is thrown
The 'TestFunction' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'TestFunction'. Microsoft.Azure.WebJobs.Host: Validation failed for property 'BlobPath', value 'Test'. The field BlobPath is invalid.
Reproduction Steps
Environment
.NET SDK: Version: 7.0.201 Commit: 68f2d7e7a3
Runtime Environment: OS Name: Windows OS Version: 10.0.22621 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\7.0.201\
Host: Version: 7.0.3 Architecture: x64 Commit: 0a2bda10e8
.NET SDKs installed: 7.0.201 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Azure Functions: Azure Functions Core Tools Core Tools Version: 4.0.5030 Commit hash: N/A (64-bit) Function Runtime Version: 4.15.2.20177