Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Git pull-request testing not working against new BitBucket Cloud integration #4015

tardis4500 ·

I have created a repo of type BitBucket Cloud and checked the Pull requests with state of OPEN but when I try to run a build I get a dashboard error. I clicked the button to "Send Error Report" but haven't heard a response back.

Error Details:

Message: Method onLinkClicked of interface org.apache.wicket.markup.html.link.ILinkListener targeted at [ [Component id = run]] on component [ [Component id = run]] threw an exception

Root cause:

com.pmease.quickbuild.plugin.tracker.core.TrackerException: Get response failed from: https://api.bitbucket.org/2.0/repositories/isqft/configlib/pullrequests with message:
at com.pmease.quickbuild.plugin.scm.bitbucketcloud.BitBucketClient.get(BitBucketClient.java:108)
at com.pmease.quickbuild.plugin.scm.bitbucketcloud.BitBucketClient.getPullRequests(BitBucketClient.java:82)
at com.pmease.quickbuild.plugin.scm.bitbucketcloud.pulls.PullRequestsWithStateProvider.getPullRequests(PullRequestsWithStateProvider.java:46)
at com.pmease.quickbuild.plugin.scm.bitbucketcloud.pulls.PullRequestsWithStateProvider$$EnhancerByCGLIB$$7ec0240b.CGLIB$getPullRequests$2( )
at com.pmease.quickbuild.plugin.scm.bitbucketcloud.pulls.PullRequestsWithStateProvider$$EnhancerByCGLIB$$7ec0240b$$FastClassByCGLIB$$ae5fdfbd.invoke( )
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
at com.pmease.quickbuild.plugin.scm.bitbucketcloud.pulls.PullRequestsWithStateProvider$$EnhancerByCGLIB$$7ec0240b.getPullRequests( )
at com.pmease.quickbuild.plugin.scm.bitbucketcloud.BitBucketCloudRepository.getShortBranches(BitBucketCloudRepository.java:172)
at com.pmease.quickbuild.plugin.scm.bitbucketcloud.BitBucketCloudRepository$$EnhancerByCGLIB$$be9144.CGLIB$getShortBranches$7( )
at com.pmease.quickbuild.plugin.scm.bitbucketcloud.BitBucketCloudRepository$$EnhancerByCGLIB$$be9144$$FastClassByCGLIB$$64e08de.invoke( )
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
at com.pmease.quickbuild.plugin.scm.bitbucketcloud.BitBucketCloudRepository$$EnhancerByCGLIB$$be9144.getShortBranches( )
at com.pmease.quickbuild.DefaultBuildEngine.requestBuild(DefaultBuildEngine.java:1835)
at com.pmease.quickbuild.DefaultBuildEngine.requestBuild(DefaultBuildEngine.java:1742)
at com.pmease.quickbuild.web.component.configuration.ConfigurationTreeView$6$1.onClick(ConfigurationTreeView.java:341)
at org.apache.wicket.markup.html.link.Link.onLinkClicked(Link.java:187)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:272)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:220)
at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:179)
at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:165)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at com.pmease.quickbuild.web.MainServlet.service(MainServlet.java:135)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.equinox.http.helper.FilterServletAdaptor$FilterChainImpl.doFilter(FilterServletAdaptor.java:56)
at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83)
at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:365)
at org.eclipse.equinox.http.helper.FilterServletAdaptor.service(FilterServletAdaptor.java:37)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at com.pmease.quickbuild.Quickbuild$DisableTraceFilter.doFilter(Quickbuild.java:1139)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:748)

Complete stack:

org.apache.wicket.WicketRuntimeException: Method onLinkClicked of interface org.apache.wicket.markup.html.link.ILinkListener targeted at [ [Component id = run]] on component [ [Component id = run]] threw an exception
at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:282)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:220)
at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:179)
at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:165)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)

java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor253.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:272)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:220)
at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:179)
at org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:165)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:719)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)

  • solved #18
  • replies 18
  • views 4462
  • stars 0
steveluo ADMIN ·

Hi@tardis4500

Do you specify the username and password when you configure BitBucket repositories? You need specify them when building with pull requests even if you are using SSH for repository url.

steveluo ADMIN ·
tardis4500 ·

I installed 8.0.25 as soon as it was released and it did not fix the problem so I sent another error report. I waited two days and then asked for an update by email to both you and Robin. After another two days I posted here. I just added the username and password and it appears to be working now.

tardis4500 ·

It would be nice to have a configuration that only built the pull-requests and not the branch itself. Is that possible?

robinshen ADMIN ·

What do you mean by "not building the branch itself"? If pull request is enabled, QB will checkout and build specified pull request (based on pull request type specified).

tardis4500 ·

Imagine that I have a branch named "mybranch." I want a configuration that will only build pull-requests for "mybranch" but won't build "mybranch" when there are changes delivered directly to it.

steveluo ADMIN ·

Hi@tardis4500

Please leave empty for Branch field to see if that is what you want.

tardis4500 ·

It seems that leaving that blank only builds pull-requests for master but not for "mybranch"

steveluo ADMIN ·

Hi@tardis4500

It builds all pull-requests with specified state (for example, OPEN) no matter for master or for other branches.

tardis4500 ·

Well, it's not working. I have left the branch field blank and there is a pull-request that it's not building.

robinshen ADMIN ·

To save resource, by default it only builds changed pull requests if option "queue changed branches only" is enabled in advanced setting of the configuration. You may turn off that option, and manually trigger the build to see if all open pull requests are in queue to build.

tardis4500 ·

It's still not working. I have created a new configuration to test all pull-requests for the repo. I turned off "queue changed branches only" and left the branch field blank in the repository definition. I then created a pull request from branch "jsmithCC/buildpy-edited-online-with-bitbucket-1543429790037" to branch "pr-test2" but the pull request is never tested.

robinshen ADMIN ·

The BitBucket plugin has some issues when build against pull requests created between two different repositories. Currently it only builds the target branch of target repository. We plan to get it addressed in QB9.

tardis4500 ·

all of my testing is within a single repository. The pull request branch is in the same branch as the target repository but it still isn't working. What should the configuration build condition be set to "changes in referenced repositories" or "always build?"

robinshen ADMIN ·

If you trigger the build manually, all open pull requests will be re-built. If it is triggered via schedule, only those with new commits on source branch will be built as it has to satisfy the condition "changes in referenced repositories".

tardis4500 ·

Then maybe I don't understand the basics of how this pull request thing should work. Suppose I have two branches in my repository (master and release). I want three configurations, one to build the master branch, one to build the release branch, and one to build any pull requests against either. I know how to setup the first two but not the pull-request configuration. What are the general settings and repository for that configuration?

robinshen ADMIN ·

For the configuration to build pull request, this is my simple setup on a brand new QB instance:

  1. Add a BitBucket cloud repository with empty branch, and pull request specified as "pull request with specified state" and choose "OPEN" state
  2. Add a step to checkout this repository
  3. Edit the configuration to schedule it to run for instance every 5 min
  4. All other settings are leave as default

When scheduled time reaches for the first time, all open pull request will be built. After that whether I create a new pull request, or make new commits into an existing pull request, the relevant pull requests will be picked up for rebuild.

tardis4500 ·

I figured it out. I had copied this configuration from another and made some changes but forgot to enable it. It is working now as expected.