az eventgrid system-topic event-subscription create - unable to handle/validate webhook endpoint with multiple query parameters correctly.
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 64
Description
### Describe the bug
When using az eventgrid system-topic event-subscription create to create an event-subscription and it validates the webhook endpoint, it does not send the query parameters beyond the 1st one.
Repo:
1. Create a system topic with az eventgrid system-topic create command to create a Microsoft.Storage.StorageAccounts topic
2. set $endpoint = "https://${functionAppUrl}/runtime/webhooks/blobs?functionName=Host.Functions.MyFunctionEventTrigger&code=$functionKey"
3. run az eventgrid system-topic event-subscription create --name scanned-images-blob-created --system-topic-name scanned-items-blobs-topic --endpoint-type "WebHook" --resource-group $resourceGroup --endpoint $endpoint
The code is the system key to the Azure function. The command errors out with "'code' is not recognized as an internal or external command,
operable program or batch file."
### Related command
az eventgrid system-topic event-subscription create
### Errors
'code' is not recognized as an internal or external command,
operable program or batch file.
if I switch code and functionName around it will say:
'functionName ' is not recognized as an internal or external command,
operable program or batch file.
### Issue script & Debug output
'code' is not recognized as an internal or external command,
operable program or batch file.
### Expected behavior
It should validate the webhook endpoint using the entirety of the url+query parameters.
This works when using portal.azure.com
### Environment Summary
azure-cli 2.56.0
core 2.56.0
telemetry 1.1.0
Extensions:
aks-preview 0.5.149
fleet 0.2.7
Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\johnsontseng\.azure\cliextensions'
Python (Windows) 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)]
### Additional context
_No response_
Contributor guide
Research direction
Start at the `az eventgrid system-topic event-subscription create` command and reproduce the Windows failure with the endpoint containing both `functionName` and `code` query parameters. Trace how endpoint validation receives the URL; done means the complete URL, including both parameters, is used and the reported reproduction succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100