Azure App Service Swap Task hindered by App Service IP Whitelist: Failed to update deployment history

Viewed 174

I have recently enabled IP whitelisting on my pre-production environments and noticed the following issue.

When I run the Azure App Service Manager Task in Azure DevOps to Swap my deployment and production slot I get hit with a warning ##[warning]Error: Failed to update deployment history. Ip Forbidden (CODE: 403).

This causes the site to throw a 500.30 and 503 errors when attempting to access the site after a swap.

This is easily fixed by then restarting the application, but of course the best flow would be to not have to have any downtime after a deployment slot swap.

DevOps service tag on whitelist

I figured the solution would be to include DevOps service tag on the whitelist of the pre-production environments.. But sadly that had no impact on the errors.

The Azure DevOps service tag added to App Service whitelist.

Full output of the release pipeline task.

2022-05-19T07:16:02.7051171Z ##[section]Starting: Swap CM slots
2022-05-19T07:16:02.7173325Z ==============================================================================
2022-05-19T07:16:02.7173625Z Task         : Azure App Service manage
2022-05-19T07:16:02.7173987Z Description  : Start, stop, restart, slot swap, slot delete, install site extensions or enable continuous monitoring for an Azure App Service
2022-05-19T07:16:02.7174442Z Version      : 0.200.0
2022-05-19T07:16:02.7174628Z Author       : Microsoft Corporation
2022-05-19T07:16:02.7174919Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-app-service-manage
2022-05-19T07:16:02.7175256Z ==============================================================================
2022-05-19T07:16:03.7506005Z Warming-up slots
2022-05-19T07:16:04.1489337Z Swapping App Service 'my-site-as-cm-tst' slots - 'secondary' and 'production'
2022-05-19T07:17:52.5029319Z Swapped App Service 'my-site-as-cm-tst' slots - 'secondary' and 'production'
2022-05-19T07:17:59.5975474Z Successfully updated deployment History at https://my-site-secondary.scm.azurewebsites.net/api/deployments/151652944672891
2022-05-19T07:17:59.7169507Z ##[warning]Error: Failed to update deployment history. Ip Forbidden (CODE: 403)
2022-05-19T07:17:59.7221693Z ##[section]Finishing: Swap CM slots

1 Answers
Related