incremental patch fails [server-side checkout, Perforce ticket-based authentication]

Hi,

my builds are failing when

  1. building incremental patches, AND
  2. using Perforce ticket-based authentication, AND
  3. using server-side checkout, AND

The failure is as follows:

[12:54:40]: Checking for changes
[12:55:12]: Clearing temporary directory: C:\BuildAgent\temp\buildTmp
[12:55:12]: Checkout directory: C:\BuildAgent\work\11552abc395c902f
[12:55:12]: Updating sources: server side checkout...
[12:55:13]: [Updating sources: server side checkout...] Will perform clean checkout. Reason: Checkout directory is empty or doesn't exist
[12:55:13]: [Updating sources: server side checkout...] Transferring cached clean patch for VCS root: QARel
[12:55:13]: [Updating sources: server side checkout...] Building incremental patch over the cached patch
[12:55:13]: [Updating sources: server side checkout...] Failed to build patch for build #312 {build id=43117}, VCS root: perforce: qaperforce:1666 {instance id=1857, parent id=70}, due to error: Login failed: password is incorrect
[12:55:12]: [Updating sources: server side checkout...] Repository sources transferred: 1.49Mb total
[12:55:12]: Will repeat attempt when server will be available, number of attempts left: 2
...
[12:55:33]: Patch is broken, can be found in file: C:\BuildAgent\temp\cache\temp8976865838764162926patch_43117
[12:55:33]: Failed to build patch for build #312 {build id=43117}, VCS root: perforce: qaperforce:1666 {instance id=1857, parent id=70}, due to error: Login failed: password is incorrect
jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl$1: Server was not able to build correct patch, most likely due to VCS errors, will try again.
at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.throwError(PatchDownloaderImpl.java:113)
at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.checkPatch(PatchDownloaderImpl.java:103)
at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.copyPatchAndCheck(PatchDownloaderImpl.java:64)
...

1. This only happens for incremental patches.

If I delete the cached patch on the server (.buildServer/system/caches/sources/*.cache), thus forcing a "clean patch", it works:

[14:41:00]: Checking for changes
[14:41:00]: Clearing temporary directory: C:\BuildAgent\temp\buildTmp
[14:41:00]: Checkout directory: C:\BuildAgent\work\11552abc395c902f
[14:41:00]: Updating sources: server side checkout... (1s)
[14:41:01]: [Updating sources: server side checkout...] Will perform clean checkout. Reason: Checkout directory is empty or doesn't exist
[14:41:01]: [Updating sources: server side checkout...] Building clean patch for VCS root: QARel
[14:41:02]: [Updating sources: server side checkout...] Transferring cached clean patch for VCS root: QARel
[14:41:02]: [Updating sources: server side checkout...] Transferring cached clean patch for VCS root: TeamCity
[14:41:01]: [Updating sources: server side checkout...] Repository sources transferred: 2.02Mb total
[14:41:01]: [Updating sources: server side checkout...] Removing C:\BuildAgent\work\11552abc395c902f
[14:41:01]: [Updating sources: server side checkout...] Updating C:\BuildAgent\work\11552abc395c902f
[14:41:01]: [Updating sources: server side checkout...] Removing C:\BuildAgent\work\11552abc395c902f
...

It also works if the last run was successful and I rerun with no pending code changes. This is probably because no incremental patch is necessary:

[15:22:08]: Checking for changes
[15:22:41]: Clearing temporary directory: E:\TeamCity\buildAgent\temp\buildTmp
[15:22:41]: Checkout directory: E:\TeamCity\buildAgent\work\11552abc395c902f
[15:22:41]: Updating sources: server side checkout...
[15:22:42]: [Updating sources: server side checkout...] Will perform clean checkout. Reason: Checkout directory is empty or doesn't exist
[15:22:42]: [Updating sources: server side checkout...] Transferring cached clean patch for VCS root: QARel
[15:22:42]: [Updating sources: server side checkout...] Transferring cached clean patch for VCS root: TeamCity
[15:22:42]: [Updating sources: server side checkout...] Repository sources transferred: 2.02Mb total
...

2. This only happens with ticket-based authentication

When I change the VCS settings to use username+password, it works. (For some reason, switching from ticket-based authentication to user+pass seems to lead to building a clean patch.)

3. This only happens with server-side checkout

I have not checked this point thoroughly, but I'm using server-side checkout, and the problem does not occur in other projects which use client-side.

Please advise.

Thanks,

Sam

TeamCity Enterprise Version 6.5.4 (build 18046)

0
2 comments

Hello Sam,

   I'd appreciate if you collect VCS debug logs on the TeamCity server side when you see the problem and send them to us (using teamcity-feedback email address).
   Or you may create an issue in our issue tracker, and attach logs there.

   A possible workaround for the problem is not to use ticket-based authentication.



   Thanks!
   KIR
0
Avatar
Permanently deleted user

Hi Kirill,

Thanks. I have entered an issue and will add the logs shortly.

Sam

0

Please sign in to leave a comment.