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

"Missing value for AzureWebJobsStorage in local.settings.json" #2244

Closed
onionhammer opened this issue Jul 22, 2022 · 15 comments · May be fixed by Azure/azure-functions-vs-build-sdk#584
Closed

Comments

@onionhammer
Copy link

This warning shows when AzureWebJobsStorage__accountName is specified and using a managed identity, so the warning shows but then the app works just fine.

@Ved2806 Ved2806 self-assigned this Jul 26, 2022
@Ved2806
Copy link

Ved2806 commented Jul 26, 2022

Hi @onionhammer Please refer discussion here Please let us know if it helps.

@onionhammer
Copy link
Author

@Ved2806 that discussion is locked, and the warning is happening local settings still, so no it doesn't help. Using managed identity works fine, the warnings show up in build though.

@Ved2806
Copy link

Ved2806 commented Aug 8, 2022

Hi @onionhammer Could you please mention the warning message?

@onionhammer
Copy link
Author

@Ved2806

....nuget\packages\microsoft.net.sdk.functions\4.1.1\build\Microsoft.NET.Sdk.Functions.Build.targets(32,5): warning : Function [EmailSend]: Missing value for AzureWebJobsStorage in local.settings.json. This is required for all triggers other than httptrigger, kafkatrigger, orchestrationTrigger, activityTrigger, entityTrigger. [C:\proj\src\Function.csproj]

@onionhammer
Copy link
Author

FYI - This is still broken.

@Ved2806
Copy link

Ved2806 commented Aug 25, 2022

Hi @onionhammer Please refer this conversation #2755. Seems like this issue has been resolved. Please let us know if it helps?
@mattchenderson Do you have any inputs on this?

@onionhammer
Copy link
Author

onionhammer commented Aug 25, 2022

@Ved2806 it has not been resolved as version 4.1.1, which is the most recent version, as you can see in the comment above referencing

nuget\packages\microsoft.net.sdk.functions\ 4.1.1 \build\Microsoft.NET.Sdk.Functions.Build.targets

  <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.1" />

@onionhammer
Copy link
Author

onionhammer commented Aug 25, 2022

The offending code may be here?

https://github.com/Azure/azure-functions-vs-build-sdk/blob/011a27ec45c31e3af1315afebaf3d2a57a8ef085/src/Microsoft.NET.Sdk.Functions.Generator/FunctionJsonConverter.cs#L238

where instead of

var azureWebJobsStorage = values.FirstOrDefault(pair => pair.Key.Equals("AzureWebJobsStorage", StringComparison.OrdinalIgnoreCase)).Value;

perhaps it could be

var azureWebJobsStorage = values.FirstOrDefault(pair => pair.Key.StartsWith("AzureWebJobsStorage", StringComparison.OrdinalIgnoreCase)).Value;

@Ved2806
Copy link

Ved2806 commented Aug 25, 2022

Hi @onionhammer Does this fixed your issue?

@onionhammer
Copy link
Author

onionhammer commented Aug 25, 2022

@Ved2806 Yes, I tested it. the code only exists to generate an invalid warning with no other side effects.

@Ved2806
Copy link

Ved2806 commented Aug 25, 2022

Hi @onionhammer Does it removed the warning message you were getting previously?

@onionhammer
Copy link
Author

@Ved2806 yes, that is the point of the change; if you have AzureWebJobsStorage__accountName or AzureWebJobsStorage in your settings you will not receive a warning

@Ved2806
Copy link

Ved2806 commented Aug 25, 2022

Hi @onionhammer Thanks for confirmation, closing this as resolved.

@Ved2806 Ved2806 closed this as completed Aug 25, 2022
@onionhammer
Copy link
Author

@Ved2806 this isnt resolved unless my PR is accepted

@onionhammer
Copy link
Author

This should be reopened

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

Successfully merging a pull request may close this issue.

2 participants