Missing deployment slot support for az functionapp update
See original GitHub issueDescribe the bug
Hi there!
When attempting to update one of the properties on my function app, I found that az functionapp update
does not have slot support. To attempt to work around this I tried using az webapp
(which does have slot support) but it gave me an error telling me to use az functionapp
instead.
Other commands that may/may not need slot support:
az functionapp config hostname get-external-ip
az functionapp deployment user set
az functionapp deployment user show
az functionapp devops-pipeline create
az functionapp function *
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az functionapp update --resource-group <rg> --name <app> --slot staging --set siteConfig.healthCheckPath=/api/HealthCheck
Errors:
az: error: unrecognized arguments: --slot staging
To reiterate, az webapp update
does have slot support.
A separate issue that I don’t need addressed is that passing in the resourceId of the slot gets ignored, e.g.
az functionapp update --ids /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{FunctionApp}/slots/staging --set siteConfig.healthCheckPath=/api/HealthCheck
Ends up silently updating the production
slot instead of the staging
slot. I imagine this is probably the behavior across all commands though. This is undesired behavior because it will cause an app restart on the production slot when an out-of-rotation slot should have been updated+restarted instead.
Expected Behavior
Update the config on the slot as expected in the same way that it does on the production
slot.
Environment Summary
Windows-10-10.0.19041-SP0
Python 3.6.8
Installer: MSI
azure-cli 2.11.0 *
Extensions:
front-door 1.0.9
Additional Context
Thanks for your help!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:13 (2 by maintainers)
Tried to reproduce again, created a new test app using instructions from above:
Before Updating Config
Update Config
After Update
✔️ Looks like the staging slot took the setting instead of the production slot
Newest version (2.38.0) fixes the issue, fixed by https://github.com/Azure/azure-cli/pull/22745, thanks @haroonf
May be fixed by https://github.com/Azure/azure-cli/pull/22745, will retest upon the next release