-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing deployment slot support for az functionapp update #15800
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ahmedelnably, @fabiocav. |
functionapp |
@gzuber could you please take a look at this? |
Hi, I have just come across this problem. I too need to update the staging slot.
Omitting Are there any alternative ways until the support is added? I'm using azure-cli 2.22.1. Thanks. |
Hi team, I'm having the same issue that az functionapp update does not support updating httpsonly for slot. It gives "unrecognized arguments: --slot staging" for example Any update on this? Az.Functions version: 2.0.0 |
do we have any updates / ways to make this work? |
I know this is not ideal but a work around is to move the production slot first. Swap the slot snd execute the same command again. This will move both production slot and staging slot to the new plan. One downside is that you will have code running from the slot so you just need to swap again at the end. |
@kevin-secrist Apologies for the late reply. The similar issue has been discussed here and I see the PR has been merged now #21698. Please let me know if you are still facing the same issue using most recent version of the AzCLI. Awaiting your reply. |
Since I reported this I've switched teams and don't work Azure anymore. With a test subscription I tried to replicate the issue a year and a half later. $ az --version
azure-cli 2.34.1
core 2.34.1
telemetry 1.0.6
Dependencies:
msal 1.16.0
azure-mgmt-resource 20.0.0
Python location '/opt/az/bin/python3'
Extensions directory '/home/kevin/.azure/cliextensions'
Python (Linux) 3.8.12 (default, Mar 2 2022, 07:26:21)
[GCC 9.3.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date. Set up test functionappaz storage account create --name azclitest5625 --resource-group azclitest --location eastus --sku Stan
dard_LRS
az functionapp create --consumption-plan-location eastus --name azclitest5625 --os-type windows --reso
urce-group azclitest --runtime dotnet --storage-account azclitest5625
az functionapp deployment slot create --resource-group azclitest --name azclitest5625 --slot staging Try to set the config
✔️ This actually returns a successful response now instead of an error. However, when I go to check the actual settings: $ az functionapp show --resource-group azclitest --name azclitest5625 --slot staging | jq .siteConfig.he
althCheckPath
null
$ az functionapp show --resource-group azclitest --name azclitest5625 | jq .siteConfig.healthCheckPath
"/api/HealthCheck" ❌ It appears that the setting gets set on the production slot instead of the specified staging slot. This matches up with the experience I had when trying to set the settings via resourceId in the original post. |
@kevin-secrist Thanks for getting back. Just checked the details about the PR #21698 and got a confirmation that the fix is yet to be released. Sending you the next release milestone details: https://github.com/Azure/azure-cli/milestone/116 which is planned for April 6th. Hope this helps. In the meantime, if you have any questions on this, please let me know. |
copying my reply from the other issue for context
|
May be fixed by #22745, will retest upon the next release |
Tried to reproduce again, created a new test app using instructions from above: $ az --version
azure-cli 2.38.0
core 2.38.0
telemetry 1.0.6
Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
Python location '/opt/az/bin/python3'
Extensions directory '/home/kevin/.azure/cliextensions'
Python (Linux) 3.10.5 (main, Jul 1 2022, 04:14:52) [GCC 11.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date. Before Updating Config$ az functionapp show --resource-group azclitest070622 --name azclitest070622 | jq .siteConfig.healthCheckPath
null
$ az functionapp show --resource-group azclitest070622 --name azclitest070622 --slot staging | jq .siteConfig.healthCheckPath
null Update Configaz functionapp update --resource-group azclitest070622 --name azclitest070622 --slot staging --set siteConfig.healthCheckPath=/api/HealthCheck After Update$ az functionapp show --resource-group azclitest070622 --name azclitest070622 | jq .siteConfig.healthCheckPath
null
$ az functionapp show --resource-group azclitest070622 --name azclitest070622 --slot staging | jq .siteConfig.healthCheckPath
"/api/HealthCheck" ✔️ Looks like the staging slot took the setting instead of the production slot Newest version (2.38.0) fixes the issue, fixed by #22745, thanks @haroonf |
Describe 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 usingaz webapp
(which does have slot support) but it gave me an error telling me to useaz functionapp
instead.Other commands that may/may not need slot support:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
Errors:
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.
Ends up silently updating the
production
slot instead of thestaging
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
Additional Context
Thanks for your help!
The text was updated successfully, but these errors were encountered: