【问题标题】:Validation errors Migrating from Devops Server to Devops Services从 Devops Server 迁移到 Devops Services 的验证错误
【发布时间】:2020-04-01 15:32:22
【问题描述】:

我正在测试将项目从本地 DevOps 服务器(最新 2019 更新 1.1)迁移到 DevOps 服务。我正在使用最新的 DataMigrationTool (Migrate.exe),但结果非常奇怪。

我正在使用

Migrator.exe validate /collection:http://localhost:8080/tfs/MyCollection /saveprocesses

问题包括:

  1. 使用未修改流程的项目,例如香草 Scrum 不匹配。例如:
[Info   @14:59:27.587] === Found 220 error(s) when compared against process TFS 2019 RTM Scrum ===
[Error  @14:59:27.587] Rules for field 'Microsoft.VSTS.Common.Priority' do not match at level 'Task'.
[Error  @14:59:27.587] Rules for field 'Microsoft.VSTS.Common.Activity' do not match at level 'Task'.
[Error  @14:59:27.587] Rules for field 'Microsoft.VSTS.Build.IntegrationBuild' do not match at level 'Task'.
[Error  @14:59:27.587] Rules for field 'Microsoft.VSTS.CMMI.Blocked' do not match at level 'Task'.
[Error  @14:59:27.587] Custom type 'Task' added a new field 'Microsoft.VSTS.Common.ActivatedDate'.
[Error  @14:59:27.587] Custom type 'Task' added a new field 'Microsoft.VSTS.Common.ActivatedBy'.
[Error  @14:59:27.587] Custom type 'Task' added rules for field 'System.Reason' at level 'transition[To Do->In Progress]'.
[Error  @14:59:27.587] Custom type 'Task' added rules for field 'System.Reason' at level 'transition[In Progress->Done]'.
[Error  @14:59:27.587] Custom type 'Task' added rules for field 'System.Reason' at level 'transition[To Do->Done]'.
[Error  @14:59:27.587] Custom type 'Task' added rules for field 'System.Reason' at level 'transition[->To Do]'.

文档说未修改的进程应该匹配没有错误。这些错误是什么意思?

  1. 导出的流程 xml 不符合架构,即使对于使用 未修改 流程的项目(在其他项目具有修改/继承流程的集合中),也会出现数百个验证错误。

例子:

  <FIELD name="Severity" refname="Microsoft.VSTS.Common.Severity" type="String" reportable="dimension">
     <ALLOWEXISTINGVALUE />
     <ALLOWEDVALUES expanditems="true" />
     <DEFAULT from="value" value="3 - Medium" />
     <ALLOWEDVALUES expanditems="true" />
  </FIELD>

这里重复了 allowedvalues 标记,并且(如果我正确理解架构)不能为空但需要指定 GLOBALLISTLISTITEM 子级。

[Error  @13:39:09.158] Step : ProcessValidation - Failure Type - Validation failed : Invalid process template: WorkItem Tracking\TypeDefinitions\Task.xml:158: TF402594: File violates the schema with the following error: The element 'ALLOWEDVALUES' has incomplete content. List of possible elements expected: 'GLOBALLIST, LISTITEM'.
[Error  @13:39:09.158] Step : ProcessValidation - Failure Type - Validation failed : Invalid process template: WorkItem Tracking\TypeDefinitions\Task.xml:167: TF402594: File violates the schema with the following error: The element 'ALLOWEDVALUES' has incomplete content. List of possible elements expected: 'GLOBALLIST, LISTITEM'.
[Error  @13:39:09.158] Step : ProcessValidation - Failure Type - Validation failed : Invalid process template: WorkItem Tracking\TypeDefinitions\Task.xml:172: TF402594: File violates the schema with the following error: The element 'ALLOWEDVALUES' has incomplete content. List of possible elements expected: 'GLOBALLIST, LISTITEM'.
[Error  @13:39:09.158] Step : ProcessValidation - Failure Type - Validation failed : Invalid process template: WorkItem Tracking\TypeDefinitions\Task.xml:203: TF402594: File violates the schema with the following error: The element 'ALLOWEDVALUES' has incomplete content. List of possible elements expected: 'GLOBALLIST, LISTITEM'.
[Error  @13:39:09.158] Step : ProcessValidation - Failure Type - Validation failed : Invalid process template: WorkItem Tracking\TypeDefinitions\Task.xml:215: TF402594: File violates the schema with the following error: The element 'ALLOWEDVALUES' has incomplete content. List of possible elements expected: 'GLOBALLIST, LISTITEM'.
[Error  @13:39:09.158] Step : ProcessValidation - Failure Type - Validation failed : Invalid process template: WorkItem Tracking\TypeDefinitions\Task.xml:243: TF402594: File violates the schema with the following error: The element 'ALLOWEDVALUES' has incomplete content. List of possible elements expected: 'GLOBALLIST, LISTITEM'.
  1. 使用修改过的流程(继承自 Scrum)对项目进行验证,其中某些工作项类型具有新状态,存在未修改流程的所有错误以及其他架构违规。例如:
<TRANSITION from="X" to="Resolved">
   <REASONS>
      <DEFAULTREASON value="Moved out of state X" />
      <DEFAULTREASON value="Moved to state Resolved " />
   </REASONS>
</TRANSITION>

&lt;REASONS&gt; 只能有一个&lt;DEFAULTREASON&gt; 标签。 继承过程中的状态就是这种情况。如果必须“修复”这些错误才能迁移项目,我该怎么做? DevOps Server 2019 的继承过程模型中的状态和转换在哪里编辑?

如果我实际上无法修复它们,那么这些错误表明什么?工具有问题吗?我该如何解决它们?

【问题讨论】:

  • 您升级了 DevOps 服务器了吗?如果您运行 ConformProject.ps1 并再次验证,结果是什么? docs.microsoft.com/en-us/azure/devops/migrate/…
  • DevOps 服务器在 2019 年更新 1.1 上,但已经升级了几次。我认为 ConformProject 失败是因为我的流程只被继承,而 Conform 只修改 xml 流程?
  • ConformProject.ps1 用于您从未自定义的项目。另一方面,检查项目是否需要configure feature

标签: azure-devops azure-devops-server-2019


【解决方案1】:

我已经用 17.153.29522.3 (AzureDevOps2019.Update1.1) 测试了 migration tool,它按预期工作。

您的任务工作项似乎已自定义并出现错误,您需要先解决错误。如果你有其他的集合,你可以和他们一起处理验证,看看你是否可以成功验证。

【讨论】:

  • 我们在同一个集合中还有其他使用定制流程的项目。在试图解决他们的问题时,我创建了一个使用默认 Scrum 流程的新空项目。显示的输出是针对该项目的。为什么我会收到该项目中工作项类型的验证错误?我确信我可以创建一个新集合并在那里验证一个新的默认项目,但这没有帮助。
  • 在其他使用修改/继承的scrum流程的项目中,生成的xml也是无效的,而且还有几个地方。例如:对于添加的状态,XML 为每个转换有两个 元素。根据架构,这显然是无效的(只能有一个默认原因)。有没有办法“解决”这个问题?可以在哪里为继承的流程模型编辑这些转换和原因?
  • 您能否仔细检查您的集合的流程模型,它应该在管理控制台中 - 团队项目集合?您的服务器是新安装的还是从其他版本升级的?看来您的流程模板很乱。
  • 这确实是从 2019 RC 版本到 2019 RTM 以及更新 1 和更新 1.1 的更新。我可以确认新集合中的项目可以正常导出。在现有集合中,即使我将所有项目更改为 vanilla scrum 并删除任何自定义字段,我也无法使其工作。因此,通过升级的集合内的进程出现了问题。除了管理控制台中的“流程模型:继承”之外,我看不到与流程模型相关的任何内容。我还能在那里做什么?
  • 您是如何导出流程 xml 的?您能否尝试停止收集并重新开始?
猜你喜欢
  • 1970-01-01
  • 2022-06-14
  • 2021-04-05
  • 2019-06-05
  • 2019-11-10
  • 2021-06-01
  • 2021-04-01
  • 2019-04-17
  • 2021-06-20
相关资源
最近更新 更多