Azure / Azure/azure-cli

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

Open
#12,710 11 comments 2 reactions 0 assignees View on GitHub
act-observability-squad customer-reported Functions Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

> ### `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
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**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.