【问题标题】:TFS Gated Checkin fails when checking in the changeset after a succesfull build成功构建后签入变更集时,TFS 门控签入失败
【发布时间】:2017-02-06 06:22:03
【问题描述】:

我正在使用 TFS 版本 2015 SP3,但在创建有效的 Gated Checkin 构建定义时遇到问题。

构建过程步骤为空,以防止构建失败。

当构建成功时,构建服务器会尝试签入指定的更改并失败。错误信息是:

搁置集_Build_56625;Build\ead50f13-855a-45bd-9417-778e04e6fdfe 无法办理入住

据我所知,这与构建服务器使用构建用户的 GUID 而不是用户名这一事实有关。 (见下图)。

构建日志

2016-09-27T14:22:59.3450903Z Checking if artifacts directory exists: C:\Agent_3\_work\1\a
2016-09-27T14:22:59.3450903Z Deleting artifacts directory.
2016-09-27T14:22:59.3607099Z Creating artifacts directory.
2016-09-27T14:22:59.3607099Z Checking if test results directory exists: C:\Agent_3\_work\1\TestResults
2016-09-27T14:22:59.3607099Z Deleting test results directory.
2016-09-27T14:22:59.3763337Z Creating test results directory.
2016-09-27T14:22:59.4232406Z Starting: Get sources
2016-09-27T14:22:59.4544938Z Entering TfvcSourceProvider.PrepareRepositoryAsync
2016-09-27T14:22:59.4544938Z localPath=C:\Agent_3\_work\1\s
2016-09-27T14:22:59.4544938Z clean=True
2016-09-27T14:22:59.4544938Z sourceVersion=68725
2016-09-27T14:22:59.4544938Z mappingJson={"mappings":[{"serverPath":"$/xxx","mappingType":"map","localPath":"\\"}]}
2016-09-27T14:22:59.4544938Z Syncing repository: xxx(TFVC)
2016-09-27T14:22:59.4544938Z workspaceName=ws_1_18
2016-09-27T14:23:00.3451244Z Undo any pending changes under workspace.
2016-09-27T14:23:01.2669675Z No inconsistencies were found to clean up.
2016-09-27T14:23:01.7044792Z Workspace Name: ws_1_18;Build\ead50f13-855a-45bd-9417-778e04e6fdfe
2016-09-27T14:23:01.7669760Z tf unshelve Gated_2016-09-27_04.22.53.2745;MyDomain\MyUser
2016-09-27T14:23:02.2413159Z edit: C:\Agent_3\_work\1\s\app\xxx\xxx.ts
2016-09-27T14:23:02.5225711Z Successfully unshelved Gated_2016-09-27_04.22.53.2745;MyDomain\MyUser into workspace ws_1_18;Build\ead50f13-855a-45bd-9417-778e04e6fdfe
2016-09-27T14:23:02.5225711Z tf get /version:68725
2016-09-27T14:23:03.0187586Z tf shelve _Build_56625 /replace
2016-09-27T14:23:03.1906333Z Successfully created new shelveset _Build_56625;Build\ead50f13-855a-45bd-9417-778e04e6fdfe
2016-09-27T14:23:03.2999952Z Done syncing repository xxx to version 68725 (workspace version C68725)
2016-09-27T14:23:03.2999952Z Leaving TfvcSourceProvider.PrepareRepositoryAsync
2016-09-27T14:23:03.4093700Z Running tasks

是的...我已阅读:

On Premise Gated Check-in Fails with "The shelveset ... could not be found for check-in" - 但我不愿意为了让它发挥作用而放弃 5 年的历史。

https://social.msdn.microsoft.com/Forums/en-US/8016349e-88dd-4fe1-aa6b-13c8d897985f/tfs-2015-on-premise-gated-checkin-fails-with-the-shelveset-could-not-be-found-for-checkin?forum=tfsbuild - 这个问题给了我一些见解,但没有有效的解决方案。

我们已经尝试过

  • 创建新代理
  • 摒弃本地工作空间

【问题讨论】:

  • 适用于我的 TFS15。由于我们没有您的环境,因此很难解决此问题。即使您提到创建一个新的团队项目也不是您的解决方案。但是,您仍然可以创建一个用于测试以缩小此问题的范围,并查看门控签入构建是否适用于新创建的构建?
  • 遇到了一个问题,该问题仅发生在从 TFS2013 升级的项目集合上,但适用于新创建的 TFS 2015 项目集合。
  • 我创建了一个新项目,创建了一个新的构建定义,添加了门控签入。然后签入一个新文件。构建失败并出现类似错误:[Error]Theshelfset _Build_56722;Build\ead50f13-855a-45bd-9417-778e04e6fdfe could not be found for check-in
  • 创建一个新的团队项目集合和团队项目怎么样?您正在运行哪个构建代理,作为服务运行还是以交互方式运行?您构建的服务帐户是否有足够的权限签入变更集?
  • 使用“旧”xaml 构建定义的正常门控签入仍然有效。

标签: tfs tfs-2015 build-server gated-checkin


【解决方案1】:

我们的问题的原因是 Tfs_Configuration 数据库中的双重构建标识。

通过以下查询,您可以检查双重身份:

SELECT * FROM tbl_Identity WHERE PartitionId = 1 AND TypeId = 8

【讨论】:

  • 哪个字段是翻倍的? (有几个身份/标识符字段)
  • 嗨@StingyJack 已经有一段时间了。你有类似的问题吗?
  • 是的,但只有显示名称之类的东西在表格中是骗子
  • 解决此问题的系统管理员已离开公司。我找不到他做了什么来修复重复。也许这个 SO 问题有帮助? stackoverflow.com/questions/25449926/…
猜你喜欢
  • 2017-08-07
  • 1970-01-01
  • 2011-07-24
  • 1970-01-01
  • 2018-12-20
  • 1970-01-01
  • 2011-04-18
  • 2014-12-08
  • 2018-07-29
相关资源
最近更新 更多