Azure / Azure/azure-functions-host
identity based connection for queue-trigger in python not fully documented and not following documented sequence
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
According to the documentation for using identity based connections, specific settings take precedence over general settings. This is not the case for the queue binding in Python.
Also the documentation does not seem to cover everything.
references:
- specific values should override less specific configuration: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue-trigger?tabs=python-v2%2Cisolated-process%2Cnodejs-v4%2Cextensionv5&pivots=programming-language-python#connections
- missing documentation of PREFIX__accountname configuration: https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue-trigger?tabs=python-v2%2Cisolated-process%2Cnodejs-v4%2Cextensionv5&pivots=programming-language-python#identity-based-connections
#### Repro steps
1. create function with a queue trigger
2. define the environment variables pointing to different storage accounts
- CONNECTION_NAME_PREFIX__queueServiceUri
- CONNECTION_NAME_PREFIX__accountName
3. set the queue trigger connection property to CONNECTION_NAME_PREFIX
#### Expected behavior
The storage account in CONNECTION_NAME_PREFIX__queueServiceUri is used, since it is more specific than CONNECTION_NAME_PREFIX__accountname
#### Actual behavior
The storage account in CONNECTION_NAME_PREFIX__accountname is used
#### Related information
Additionally I would expect it to be in the documentation that CONNECTION_NAME_PREFIX__accountname can be used by the queue-trigger, since this would make configuration much simpler (e.g. multiple functions using the same storage account for blobs, queue etc can reuse the same setting)
Contributor guide
Research direction
Start with the linked queue-trigger connections and identity-based connections documentation, then reproduce the issue using the two documented environment-variable forms and the queue trigger connection property. Compare the selected storage account with the stated precedence rules and verify whether the accountName form is supported. Done means the behavior and documentation agree, including the reusable accountName configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100