错误交换槽设置发布管理 Visual Studio 团队服务

Error swap slot settings Release Management Visual Studio Team Services

在 Visual Studio Team Services 的发布管理中,我收到以下错误:

"Code": "Conflict", 
"Message": "The slot cannot be changed because its configuration settings have been prepared for swap.", 
"ExtendedCode": "04081",
"MessageTemplate": "The slot cannot be changed because its configuration settings have been prepared for swap.",

在 "Azure Deployment" 步骤中的发布管理模板中,我有以下配置: Azure 连接类型:Azure 资源管理器 操作:创建或更新资源组 部署模式:增量

我们有一个 ARM 模板,其中仅包含我们希望应用于生产槽的应用设置。此版本中的前一步是 "Swap"

更多信息:我们首先发布到一些测试槽,然后是 QA 槽,它与 PROD 交换。 这首先发生在计划发布时(午夜)

插槽是这样的:

QA:

  • some steps (like blob copy),
  • final step: deploy a complete ARM template which creates the resources

PROD:

  • step 1: SWAP, with Azure App Service Manager (Preview)
  • step 2: ARM template with only AppSettings

即使是新构建(触发新版本)仍然会导致此错误,任何 hints/clues?

我们似乎已经解决了这个问题

  • PROD 中只有 运行 步骤 2(不执行交换)
  • 使用另一个管理员凭据
  • 尝试几天后

还不确定哪个是罪魁祸首。

Azure 应用服务管理器(预览版)用作交换步骤

我找到了这个问题的根本原因。如果 Azure 应用服务管理器(交换步骤)由于某种原因失败,在这种情况下,交换操作不会完成并使应用服务处于不一致状态。

如果您转到 Azure 门户并查看应用服务概述,则 'Complete Swap' 选项已启用,而不是 'Swap'。因此,我们应该首先取消或完成未完成的交换。这样做之后,部署工作正常,没有这个错误。