question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fail to deploy .net core function app using az functionapp deployment source config-zip

See original GitHub issue

az feedback auto-generates most of the information requested below, as of CLI version 2.2.0

Describe the bug

When deploying a .net core function app to Azure Functions on Windows App Service Plan, the deployment fails if it requires changes in app settings.

There’s a race condition here:

  1. If the app settings are changed before or after the deployment is initiated, the build fails.
  2. If the app settings are not changed before the deployment is initiated, the build succeeds.

To Reproduce

  1. Create a .Net Core 2.2 Function App in Windows Standard App Service Plan
  2. Prepare a simple function app content, and compress it into a zip file.
  3. Run the command to change the appsettings az functionapp config appsettings set -n $functionAppName -g $resourceGroupName --settings APPINSIGHTS_INSTRUMENTATIONKEY=$instrumentationKey
  4. Run the command az functionapp deployment source config-zip -g $resourceGroupName -n $functionAppName --src <local_zip_file>
  5. Wait a while and will see the deployment failure error

Expected behavior

The deployment should succeed.

Environment summary

DevOps Hosted Agent: Ubuntu 16.04 Azure CLI Task Shell Type: bash CLI Version: azure-cli 2.2.0

command-modules-nspkg 2.0.3 core 2.2.0 nspkg 3.0.4 telemetry 1.0.4

Extensions: azure-devops 0.17.0

Python location ‘/opt/az/bin/python3’ Extensions directory ‘/opt/az/azcliextensions’

Python (Linux) 3.6.5 (default, Mar 6 2020, 14:41:35) [GCC 5.4.0 20160609]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
m1ckr1skcommented, Apr 20, 2020

We are also seeing this issue on both v2.2.0 and v2.3.1 when deploying function apps. Last successful deployment was on v2.1.0

1reaction
anthonychucommented, Mar 26, 2020

Looks like the app was still restarting after changing the app setting when you started the deployment command. Can you either wait until the restart completes or change the setting after deployment is complete?

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub Actions Function App config-zip error
The error is with Azure Function App zip deployment. az functionapp deployment source config-zip. The workaround is to downgrade ...
Read more >
AuthorizationFailed az functionapp deployment source ...
To perform any operations like Create, Update, Deploy or delete on the Function App-level tasks, Contributor role is enough for the user.
Read more >
How to Deploy your Azure Functions Faster and Easily with ...
I will create the Azure Function App and storage using an Azure Resource Manager ... Deploying Function Code" az functionapp deployment source config-zip...
Read more >
Pipeline Azure Functions Task issues - Visual Studio Feedback
For now we've deploying the functions using power shell scripts ( az functionapp deployment source config-zip ) as a work around, but we're...
Read more >
Azure Functions Zip Deploy with Azure AD Authentication
Do you think that the AZ cli's built-in `az functionapp deployment source config-zip` command will be able to automatically inject an Azure AD ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found