MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.28k stars 21.46k forks source link

Default parameter value (connection) is not aligned for v2 #50239

Open justinyoo opened 4 years ago

justinyoo commented 4 years ago

There are three parameters, taskHub, connection and code, according to this section, https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-http-api

connection: The name of the connection string for the storage account. If not specified, the default connection string for the function app is assumed.

The default connection string name is AzureWebJobsStorage. However, when I run a Durable Functions app on my local, it has a default value of Storage, instead of AzureWebJobsStorage.

image

I suspect that, due to this discrepancy, I get an error like below with Azurite (the local storage emulator). If I use a real Storage Account instance, the error doesn't show up.

image

[16/3/2020 10:52:07 am] Executed 'ScheduledEvents_HttpStart' (Failed, Id=4e8a977b-f4b7-4fe0-a787-3b4781d61d77) [16/3/2020 10:52:07 am] System.Private.CoreLib: Exception while executing function: ScheduledEvents_HttpStart. Microsoft.WindowsAzure.Storage: Not Found.

It would be great if you can have a look at this.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

DixitArora-MSFT commented 4 years ago

Hi @justinyoo Thanks for reaching out. We will review and update as appropriate.

DixitArora-MSFT commented 4 years ago

@justinyoo I believe this is already mentioned in the public doc while creating Azure Durable function locally. Refer this which discuss about this. https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-create-first-csharp

I don't think there is a doc change required for this.

justinyoo commented 4 years ago

@DixitArora-MSFT I'm afraid I can't find the relevant section on the doc you linked above. Can you point out where I can find the parameter, connection in your doc?

FYI - I'm using Durable Functions v2.

DixitArora-MSFT commented 4 years ago

@justinyoo I have lopped in Chris from Azure Function product team to comment further on this , if I missed something.

cgillum commented 4 years ago

We internally use the WebJobs SDK to look up the storage account connection string by name. The WebJobs SDK accepts both Storage and AzureWebJobsStorage to be equivalent, and ultimately returns the default connection named AzureWebJobsStorage.

Given that this works correctly with a real storage account and fails with Azurite, I suspect this is actually a compatibility issue with Azurite. There is an existing thread which discusses some of the compatibility issues folks have run into. I suggest you take a look and see if that might apply to your case as well: https://github.com/Azure/Azurite/issues/115.