Perforce Workspaces not getting deleted ..

Any idea about the following:
When using Perforce as VCS, TeamCity builds create perforce workspaces - but it is not able to delete them.

In the teamcity-vcs.log i see warnings like:
[2021-05-17 15:54:14,557] WARN - jetbrains.buildServer.VCS.P4 - Deleting workspace svc_user_TC_p4_AA_centos_2_4afd1570773be1dd_b111e01e3f772d98
[2021-05-17 15:54:14,902] WARN - jetbrains.buildServer.VCS.P4 - Cannot remove client svc_user_TC_p4_AA_centos_2_4afd1570773be1dd_b111e01e3f772d98, due to: You don't have permission for this operation.
[2021-05-17 15:54:14,902] WARN - jetbrains.buildServer.VCS - Cannot cleanup P4 workspaces for VCS Root general_vcs {internal id=537}: You don't have permission for this operation.

I try to delete the workspace via P4 (logging in as the Perforce user specified in VCS root)

p4 client -d svc_user_TC_p4_AA_centos_2_4afd1570773be1dd_b111e01e3f772d98
Client 'svc_user_TC_p4_AA_centos_2_4afd1570773be1dd_b111e01e3f772d98' has files opened. To delete the client, revert any opened files and delete any pending changes first. An administrator may specify -f to force the delete of another user's client.

p4 opened -C svc_user_TC_p4_AA_centos_2_4afd1570773be1dd_b111e01e3f772d98
//depot/ProductAA/AA/rel_AA_21.2/Server/dependency-check-filter.xml#1 - add default change (text) by svc_user@svc_user_TC_p4_AA_centos_2_4afd1570773be1dd_b111e01e3f772d98

Deletion fails - reporting that the workspace has files opened - when i check it seems that TeamCity has added and opened a file: dependency-check-filter.xml#1 in the workspace (this file does not exist in our Perforce depot.

According to:  TeamCity does delete workspaces in certain cases!!.

What user does TeamCity use to create the worspaces and why it tries to delete the workspaces and fails (as per entries in: teamcity-vcs.log). If TeamCity is creating the workspaces, should it not also be able to delete them?

Please sign in to leave a comment.