[BUG]: Conflict between Azure App Services Settings and Azure Functions (specifically 'function' auth compatibility)
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 215
- Avg merge
- 4h 2m
- Merged PRs (30d)
- 1
Description
Our repo uses Azure Pipeline Tasks and Azure Functions, and we have a healthCheck endpoint that is using anonymous authentication and 2 endpoints using 'function' authentication. The function authentication has some conflict with Azure App Service Settings. After the endpoint completes release, hits to the endpoint causes one of three errors on the 'function' authenticated endpoints (the anonymous function works everytime):
1. Endpoints that never return, just hang
2. Endpoints that return a 503 error
3. Endpoints that return a 401 error (example attached)

The errors is persistent and repeatable, and we can only fix the site by re-releasing the pipeline.
We think there's some race condition between Azure App Services Settings that makes the functional authentication not work as expected. We can workaround this race condition by:
1. Introducing a delay in the pipeline after the Azure App Services Settings is run.

2. Turning off the Azure App Services Settings (obviously not useful)
3. Inverting the order of the Swap Slots Task step and the Azure App Services Settings (exposes us to a moment where the older settings are working on the new Slot)
5. Turning off the function authentication in our Azure Function (ok for now since that route has additional authentication, but not ideal for other planned work).
I will also file this bug with https://github.com/Azure/azure-functions-host/issues and have filed it with Azure Pipeline Tasks (https://github.com/microsoft/azure-pipelines-tasks/issues/19173)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.