Azure / Azure/azure-cli

Creating deployment slots via the cli vs the portal results in different behavior.

Open
#22,639 16 comments 0 reactions 2 assignees Claimed by @oncerune View on GitHub
act-observability-squad Auto-Assign customer-reported Functions Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**
`az functionapp deployment slot create`. Full command:
```
az functionapp deployment slot create `
--name $app `
--resource-group $env:RESOURCE_GROUP `
--slot blue `
--configuration-source $app
```

**Describe the bug**
- When creating a Deployment Slot, using the CLI to do so versus using the Azure Portal results in different behavior.
- If the slot is created using the CLI, pushing code to the slot results in the code automatically being also deployed/swapped to the production slot over a period of times (~5 minutes, we verified using our internal logs).
- We theorized this could be because of [auto swap](https://docs.microsoft.com/en-us/cli/azure/functionapp/deployment/slot?view=azure-cli-latest#az-functionapp-deployment-slot-auto-swap). However, disabling auto swaps with the command `az functionapp deployment slot auto-swap --slot blue --disable --name --resource-group ` still results in the same behavior.
- If the slot is created using the online portal, pushing code to the slot does NOT deploy the code to the production slot too.

**To Reproduce**

- Create a new slot using the portal.
- Push code to the new slot
- Observe that the production slot still has the code as intended.
- Delete the slot and recreate it using the CLI.
- Push code to the new slot.
- Observe that the production slot will have the code pushed to the new slot in around 5-10 minutes.

**Expected behavior**
- Creating slots via the CLI or the Portal should result in the same behavior.

**Environment summary**

- Install Method: .exe
- CLI version: `2.37.0`
- OS Version: Windows 10
- Shell: Powershell

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.