App Service deployment slot replicated to production before we swapped the slots

Stuart 1 Reputation point

We had an issue with our deployment pipeline for our Azure app service on our last push to production, and I wanted to ask if anyone has seen similar, or has any ideas why it's happening?

Our typical flow is to push from our staging environment to a prep slot off our main production environment. We'll then make final checks of the new code on the prep slot before switching the prep and production slots, pushing the new code live.

On our most recent push, however, something unexpected happened. We pushed code from staging to the prep slot and, once deployed, I checked the production site to ensure that process hadn't disrupted production (no reason it should, but I like to check). Everything was fine, and production was running the soon-to-be-replaced version of the site.

As we were testing the code on the prep slot (a process which took about an hour) we noticed that the code on the live production site had been replaced with the code we had just pushed to the prep slot. We hadn't taken any steps to request this, and the prep and production slots hadn't swapped; they were both running the latest code we had pushed to the prep slot only.

One thing we did notice was that, a few minutes after deployment, we received an Azure Monitor notification that our resource capacity was being auto-scaled from 1 to 2. Could this auto-scaling have confused the two slots and taken our prep slot code live?

Any advice or suggestions greatly appreciated :)

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,831 questions
{count} votes