Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build output warnings don't accomodate identity-based connections #541

Open
mattchenderson opened this issue Feb 4, 2022 · 1 comment
Open

Comments

@mattchenderson
Copy link
Contributor

The Build process complains with warnings if you use identity-based connections for testing locally.

For example, my BlobTrigger attribute might be [BlobTrigger("samples-workitems/{name}", Connection = "myblobaccount")], and in my local.settings.json, I have myblobaccount__serviceUri set to a valid service URI. This is perfectly valid, but the build output shows a warning:

cannot find value named 'myblobaccount' in local.settings.json that matches 'connection' property set on 'blobTrigger'

The same is also true if you do the same style of thing for AzureWebJobsStorage:

Missing value for AzureWebJobsStorage in local.settings.json. This is required for all triggers other than httptrigger, kafkatrigger, orchestrationTrigger, activityTrigger, entityTrigger.

The relevant code looks to be here: https://github.com/Azure/azure-functions-vs-build-sdk/blob/main/src/Microsoft.NET.Sdk.Functions.Generator/FunctionJsonConverter.cs

Instead of only looking for an exact match on the key, we should look for it as a prefix. This was already done in the Core Tools which may serve as a reference. Relevant issues: Azure/azure-functions-core-tools#2755 and Azure/azure-functions-core-tools#2552

@slaneyrw
Copy link

I'm getting the same error with a ServiceBus trigger. I have the "__fullyQualifiedNamespace" key in the local.settings.json.

Maybe change the detection to "startwith" instead of exact match

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants