teamcity-plugins
teamcity-plugins copied to clipboard
Error in "com.arcbees.pullrequest.PullRequestStatusHandler": 400 bad request from BitBucket
Hello,
We have installed the plugin and our TeamCity is now aware of pull-requests made in BitBucket, it runs our build-configuration, but when it tries to update pull-request in BitBucket it fails with the following error:
May 17, 2016 9:38:01 AM com.arcbees.pullrequest.PullRequestStatusHandler handle
INFO: Handling build status - Build Status: STARTING, Branch: ANGULAR-86_payment-options, isSuccessful: true
May 17, 2016 9:38:01 AM com.arcbees.pullrequest.PullRequestsBuildListener$2 run
SEVERE: Error updating pull request status.
com.arcbees.vcs.util.UnexpectedHttpStatusException: Failed to complete request. Status: HTTP/1.1 400 BAD REQUEST
{"error": {"fields": {"key": ["Ensure this value has at most 40 characters (it has 47)."]}, "message": "Bad request"}}
at com.arcbees.vcs.AbstractVcsApi.doExecuteRequest(AbstractVcsApi.java:128)
at com.arcbees.vcs.AbstractVcsApi.executeRequest(AbstractVcsApi.java:51)
at com.arcbees.vcs.bitbucket.BitbucketApi.updateStatus(BitbucketApi.java:140)
at com.arcbees.pullrequest.PullRequestStatusHandler.updateStatus(PullRequestStatusHandler.java:129)
at com.arcbees.pullrequest.PullRequestStatusHandler.handle(PullRequestStatusHandler.java:85)
at com.arcbees.pullrequest.PullRequestsBuildListener$2.run(PullRequestsBuildListener.java:87)
at jetbrains.buildServer.util.ExceptionUtil$1.run(ExceptionUtil.java:41)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Shall we have restrictions in branch-names or something?
Thanks.
At the moment the plugins uses the build configuration name + build ID to generate a unique key. I think your build configuration name might be too long. Can you try to make it shorter and see if it works?
We'll try to fix that soon