Labeling process failed when using Vault VCS...

I have a working Build Configuration which uses SourceGear Vault as the VCS root.  Additionally, I have a number of VCS Checkout Rules configured to exclude the non-target code and materials that are in our Vault repository.  The build configuration works as expected: the Agent gets the latest source from Vault, builds the project, creates artifacts, etc.  However, whenever I attempt to apply a label after the build, I receive the following (I apologize for the large stack trace...)

Labeling process failed: System.Exception: Delete Label error: The label could not be found.     at clr.System.ExceptionStaticWrapper.ExceptionCtor(Unknown Source)     at VaultClientIntegrationLib.ServerOperations.ProcessCommandDeleteLabel(ServerOperations.cs:1067)     at jetbrains.buildServer.buildTriggers.vcs.vault.VaultConnection.deleteLabel(VaultConnection.java:367)     at jetbrains.buildServer.buildTriggers.vcs.vault.VaultConnection.access$000(VaultConnection.java:42)     at jetbrains.buildServer.buildTriggers.vcs.vault.VaultConnection$2.process(VaultConnection.java:359)     at jetbrains.buildServer.buildTriggers.vcs.vault.VaultConnection.doInConnection(VaultConnection.java:61)     at jetbrains.buildServer.buildTriggers.vcs.vault.VaultConnection.label(VaultConnection.java:357)     at jetbrains.buildServer.buildTriggers.vcs.vault.VaultVcsSupport.label(VaultVcsSupport.java:267)     at jetbrains.buildServer.vcs.impl.VcsLabeler.setLabel(VcsLabeler.java:72)     at jetbrains.buildServer.vcs.impl.VcsLabeler.setLabel(VcsLabeler.java:58)     at jetbrains.buildServer.serverSide.impl.FinishedBuildImpl.setLabel(FinishedBuildImpl.java:39)     at jetbrains.buildServer.serverSide.impl.auth.SecuredBuildFactory$SecuredFinishedBuildImpl.setLabel(SecuredBuildFactory.java:6)     at jetbrains.buildServer.controllers.SetLabelAction.doProcess(SetLabelAction.java:14)     at jetbrains.buildServer.controllers.OneParamAction.process(OneParamAction.java:8)     at jetbrains.buildServer.controllers.BaseActionController.doAction(BaseActionController.java:51)     at jetbrains.buildServer.controllers.BaseAjaxActionController$1.handleRequest(BaseAjaxActionController.java:46)     at jetbrains.buildServer.controllers.AjaxRequestProcessor.processRequest(AjaxRequestProcessor.java:45)     at jetbrains.buildServer.controllers.BaseAjaxActionController.doHandle(BaseAjaxActionController.java:44)     at jetbrains.buildServer.controllers.BaseController.handleRequestInternal(BaseController.java:73)     at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)     at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)     at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)     at jetbrains.buildServer.maintenance.TeamCityDispatcherServlet.service(TeamCityDispatcherServlet.java:12)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     at jetbrains.buildServer.web.ParametersProviderCalculationContextFilter.doFilter(ParametersProviderCalculationContextFilter.java:2)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     at jetbrains.buildServer.web.DisableSessionIdFromUrlFilter.doFilter(DisableSessionIdFromUrlFilter.java:6)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     at jetbrains.buildServer.web.DiagnosticFilter.doFilter(DiagnosticFilter.java:21)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     at jetbrains.buildServer.web.ResponseFragmentFilter.doFilter(ResponseFragmentFilter.java:15)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)     at java.lang.Thread.run(Unknown Source)

This occurs if the label is configured as a part of the Build Configuration, or if I attempt to label the build manually.

Can anyone provide any help how I can troubleshoot what is happening?

8 comments
Comment actions Permalink

Oops!  I meant to post the following:

We're using:

TeamCity Professional Version 7.1.1 (build 24074)

0
Comment actions Permalink

David, what Vault server version are you running? Did you upgrade Vault or TeamCity recently?

0
Comment actions Permalink

We are currently using Vault Standard v5.1.2.  We recently upgraded TeamCity to 7.1.1 (build 24074).

Thanks!

0
Comment actions Permalink

David,
Did you see this error before upgrading TeamCity to 7.1.1?
What Vault Vault Java Command Line Client did you put to TeamCity?
We've tested this functionality with Vault 5.x and it works fine.

0
Comment actions Permalink

This particular Build Configuration (the one that is failing) was created after the TeamCity upgrade to v7.1.1.  An older Build Configuration that was created pre-upgrade succeeds.  Other than the Label Pattern itself, there does not appear to be any difference in the labeling configuration between the two.

TeamCity is configured to use v5.1.2 of the Vault Java CLC.

Without understanding the internals of the Vault Plugin, it looks like it's failing to delete a label???  Although I'm unsure why it would be trying to delete a label in the first place.

Please let me know if there is anything else I can offer to help.

Thanks!

0
Comment actions Permalink

Hello, David,

Thank you for details!

This particular Build Configuration (the one that is failing) was created after the TeamCity upgrade to v7.1.1.  An older Build Configuration that was created pre-upgrade succeeds.  Other than the Label Pattern itself, there does not appear to be any difference in the labeling configuration between the two.

It seems quite strange to me. What are labeling settings in these two configurations?

Without understanding the internals of the Vault Plugin, it looks like it's failing to delete a label???  Although I'm unsure why it would be trying to delete a label in the first place.

Vault API doesn't give any ability to check if some label is added, so we call label delete before adding it. Label delete does nothing if no label present and normally doesn't fail. So you are the first one who faced such a problem.

0
Comment actions Permalink

Here are some screenshots of the VCS settings for each build configuration.

Build Configuration 1 is the configuration which succeeds in creating the label in Vault.

Build Configuration 2 is the configuration which fails to create the label.

FYI - Since the textbox is truncated in the screenshot, the labelling pattern for Build Configuration 2 is: %system.teamcity.buildConfName%-%system.build.number%



Attachment(s):
Build Configuration 2.PNG
Build Configuration 1.PNG
0
Comment actions Permalink

Hello, David,

I've tried to reproduce the problem but so far without success. Here is an issue in out tracker - please follow it http://youtrack.jetbrains.com/issue/TW-24203

0

Please sign in to leave a comment.