Azure / Azure/azure-functions-host
Emit Diagnostic Event for unsupported cross-stamp scaling settings
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
We've just had a CRI where a site was eligible for cross-stamp scaling but was using "files" as their secret store. This isn't supported because each stamp has it's own file system. This led to lots of random 401s being returned as each instance could potentially have it's own secrets, depending on the stamp.
We should be able to emit a diagnostic warning from the host if we detect:
- [not using Azure Files](https://learn.microsoft.com/en-us/azure/azure-functions/storage-considerations?tabs=azure-cli#create-an-app-without-azure-files) -- meaning they are missing `WEBSITE_CONTENTAZUREFILECONNECTIONSTRING` and `WEBSITE_CONTENTSHARE`
- using a url for [`WEBSITE_RUN_FROM_PACKAGE`](https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#website_run_from_package)
- using "files" for [`AzureWebJobsSecretStorageType`](https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#azurewebjobssecretstoragetype)
- not using [`WEBSITE_DISABLE_CROSS_STAMP_SCALE`](https://learn.microsoft.com/en-us/azure/app-service/reference-app-settings?tabs=kudu%2Cdotnet#scaling)
It's a very confusing collection of settings that can cause issues and could be worth warning about when we detect it.
Contributor guide
Research direction
Start by locating the host code that reads Azure Functions app settings and emits diagnostic warnings. Trace handling for WEBSITE_CONTENTAZUREFILECONNECTIONSTRING, WEBSITE_CONTENTSHARE, WEBSITE_RUN_FROM_PACKAGE, AzureWebJobsSecretStorageType, and WEBSITE_DISABLE_CROSS_STAMP_SCALE. Done means unsupported cross-stamp scaling combinations produce a clear diagnostic warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100