Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in "com.arcbees.pullrequest.PullRequestStatusHandler": 400 bad request from BitBucket #44

Open
javierjeronimo opened this issue May 17, 2016 · 1 comment

Comments

@javierjeronimo
Copy link

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.

@meriouma
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants