Azure / Azure/azure-cli

az function app traffic-routing set to 100% from any slot other than production causes all function code to be lost

Open
#13,485 6 comments 0 reactions 0 assignees View on GitHub
act-observability-squad customer-reported Functions question 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.0.62

**Describe the bug**
I'm exploring a version of blue/green deployments using the production and a slot of a functionapp. To do this, I deploy to the unactive (0% traffic) slot, test, then change the traffic on that slot to 100%. However, I change the traffic back to 100% on the production slot, the functions all disappear and clients receive 404's when trying to hit any of them. The commands I'm using are `az webapp traffic-routing set --distribution production=100 --name *** --resource-group ***` and `az webapp traffic-routing set --distribution warm=100 --name *** --resource-group ***`. If I then change it back to the slot having all the traffic then the production functions reappear

**To Reproduce**
1. Create a functionapp with a slot (referred to as stage in these steps) (we have it on a premium app service plan running node)
2. deploy some function to the production and slot of the app
3. run the command `az webapp traffic-routing set --distribution stage=100 --name *** --resource-group ***`
4. then run the command `az webapp traffic-routing set --distribution production=100 --name *** --resource-group ***`
5. go into the portal and notice that production slot functions are gone (may have to refresh a couple times as it seems sometimes it may take up to 30-60 seconds for them to disappear)
6. run the command `az webapp traffic-routing set --distribution stage=100 --name *** --resource-group ***` again
7. Go back to portal and notice production functions are now back

**Expected behavior**
production functions do not disappear or cleared or whatever is happening

**Environment summary**
- Install Method: apt-get
- CLI version: 2.5.1
- OS Version: elementary OS 5.1.4 Hera (Built on Ubuntu 18.04.4 LTS)
- Shell: bash

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.