History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-2369
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Steve Luo
Reporter: John Szakmeister
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Fill in the context for the GitHub status API...

Created: 14/Mar/15 02:55 PM   Updated: 16/Aug/16 01:18 PM
Component/s: None
Affects Version/s: 6.0.9
Fix Version/s: 6.1.22

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. pull-request-status.png
(156 kb)


 Description  « Hide
At the moment, when QuickBuild posts its status to GitHub, it's not filling in the context variable which results in a label of 'default' being applied to the status. It'd be nice to fill this in with something like "continuous-integration/quickbuild" or "continuous-integration/quickbuild/user-defined-string"). See the context parameter in https://developer.github.com/v3/repos/statuses/#parameters for more information.

BTW, sorry for all the tickets lately. I don't expect you to fix them all or fix them all right away. But I wanted to share the things I've been running across.

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [15/Mar/15 01:13 AM]
Hi John,

No problem at all for the tickets. Just keep filing if necessary and we will schedule them into future versions of QB appropriately.

John Szakmeister [26/Mar/15 08:14 PM]
For what it's worth, the egit-github client recently added support for this (http://git.eclipse.org/c/egit/egit-github.git/commit/?id=7f02b89a2a6bb78942c695317657c081e5b310ce), though the patch has been around since November last year.

Robin Shen [27/Mar/15 12:57 AM]
Thanks for the info. Will check into this when we get to fix this issue.

Robin Shen [03/Apr/15 02:28 AM]
Has to postpone this as QB relies on GitHub Java API to do the job, and the version supporting context requires JDK 1.7, while QB has to support JDK 1.6 now. Will include this change when QB jumps to JDK 7 (perhaps end of this year).

John Szakmeister [08/Jul/16 11:10 PM]
Just curious if the jump to 1.7/1.8 will be happening at all along with getting a new egit-github-client? I get questions about this frequently for the Neovim project.

Robin Shen [09/Jul/16 12:08 AM]
Yes, we will update version of the shipped egit/github integration jar.

John Szakmeister [14/Jul/16 09:13 AM]
After an upgrade from 6.1.19 to 6.1.20, I'm getting:

2016-07-14 05:10:51,480 [qtp1006161290-49] ERROR com.pmease.quickbuild.repositorysupport.Repository - Error constructing repository from DOM.
 java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
  at com.pmease.quickbuild.bootstrap.BootstrapUtils.wrapAsUnchecked(BootstrapUtils.java:56)
  at com.pmease.quickbuild.util.ExceptionUtils.wrapAsUnchecked(ExceptionUtils.java:82)
  at com.pmease.quickbuild.migration.MigrationHelper.migrate(MigrationHelper.java:158)
  at com.pmease.quickbuild.migration.VersionedDocument.toBean(VersionedDocument.java:531)
  at com.pmease.quickbuild.migration.VersionedDocument.toBean(VersionedDocument.java:500)
  at com.pmease.quickbuild.repositorysupport.Repository.fromDOM(Repository.java:704)
  at com.pmease.quickbuild.model.Configuration.getRepositories(Configuration.java:2027)
  at com.pmease.quickbuild.model.Configuration.findRepositories(Configuration.java:1932)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:196)
  at com.pmease.quickbuild.model.Configuration_$$_jvstc42_0.findRepositories(Configuration_$$_jvstc42_0.java)
  at com.pmease.quickbuild.web.page.setting.RepositoriesPanel$8.iterator(RepositoriesPanel.java:282)
  at org.apache.wicket.markup.repeater.data.DataViewBase$ModelIterator.<init>(DataViewBase.java:109)
  at org.apache.wicket.markup.repeater.data.DataViewBase.getItemModels(DataViewBase.java:76)
  at org.apache.wicket.markup.repeater.AbstractPageableView.getItemModels(AbstractPageableView.java:101)
  at org.apache.wicket.markup.repeater.RefreshingView.onPopulate(RefreshingView.java:93)
  at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:119)
  at org.apache.wicket.markup.repeater.AbstractPageableView.onBeforeRender(AbstractPageableView.java:115)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:986)
  at org.apache.wicket.Component.beforeRender(Component.java:1022)
  at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1785)
  at org.apache.wicket.Component.onBeforeRender(Component.java:3798)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:986)
  at org.apache.wicket.Component.beforeRender(Component.java:1022)
  at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1785)
  at org.apache.wicket.Component.onBeforeRender(Component.java:3798)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:986)
  at org.apache.wicket.Component.beforeRender(Component.java:1022)
  at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1785)
  at org.apache.wicket.Component.onBeforeRender(Component.java:3798)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:986)
  at org.apache.wicket.Component.beforeRender(Component.java:1022)
  at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1785)
  at org.apache.wicket.Component.onBeforeRender(Component.java:3798)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:986)
  at org.apache.wicket.Component.beforeRender(Component.java:1022)
  at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1785)
  at org.apache.wicket.Component.onBeforeRender(Component.java:3798)
  at org.apache.wicket.Page.onBeforeRender(Page.java:823)
  at com.pmease.quickbuild.web.page.BasePage.onBeforeRender(BasePage.java:345)
  at org.apache.wicket.Component.internalBeforeRender(Component.java:986)
  at org.apache.wicket.Component.beforeRender(Component.java:1022)
  at org.apache.wicket.Component.internalPrepareForRender(Component.java:2191)
  at org.apache.wicket.Page.internalPrepareForRender(Page.java:280)
  at org.apache.wicket.Component.render(Component.java:2280)
  at org.apache.wicket.Page.renderPage(Page.java:1035)
  at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
  at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:182)
  at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:147)
  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:734)
  at com.pmease.quickbuild.web.MainServlet.service(MainServlet.java:133)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
  at org.eclipse.equinox.http.helper.FilterServletAdaptor$FilterChainImpl.doFilter(FilterServletAdaptor.java:56)
  at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:82)
  at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:243)
  at org.eclipse.equinox.http.helper.FilterServletAdaptor.service(FilterServletAdaptor.java:37)
  at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1336)
  at com.pmease.quickbuild.Quickbuild$DisableTraceFilter.doFilter(Quickbuild.java:1057)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
  at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
  at org.eclipse.jetty.server.Server.handle(Server.java:365)
  at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
  at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
  at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
  at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
  at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
  at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
  at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
  at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
  at java.lang.Thread.run(Thread.java:745)
 Caused by: java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at com.pmease.quickbuild.migration.MigrationHelper.migrate(MigrationHelper.java:156)
  ... 87 more
 Caused by: org.dom4j.IllegalAddException: The node "org.dom4j.tree.DefaultElement@7f3af4d9 [Element: <contextLabel attributes: []/>]" could not be added to the branch "null" because: Cannot add another element to this Document as it already has a root element of: com.pmease.quickbuild.plugin.scm.github.GitHubRepository
  at org.dom4j.tree.AbstractDocument.checkAddElementAllowed(AbstractDocument.java:241)
  at org.dom4j.tree.AbstractDocument.add(AbstractDocument.java:203)
  at org.dom4j.tree.AbstractDocument.addElement(AbstractDocument.java:173)
  at com.pmease.quickbuild.migration.VersionedDocument.addElement(VersionedDocument.java:205)
  at com.pmease.quickbuild.plugin.scm.github.GitHubRepository.migrate1(GitHubRepository.java:294)
  ... 92 more

John Szakmeister [14/Jul/16 10:09 AM]
Also, was there something added so that we can configure the context? The goal here is to stop having the build report itself as "default" on pull requests, and put in something more friendly (maybe "QuickBuild", or the like). See the attached picture for what I'm talking about.

John Szakmeister [14/Jul/16 10:10 AM]
An example showing how QB shows up as "default" on pull requests.

John Szakmeister [27/Jul/16 11:59 PM]
Is there anything else I should provide here?

Robin Shen [15/Aug/16 10:06 PM]
Steve,

Migration is incorrect. The correct migration should be:
@SuppressWarnings("unused")
private void migrate1(VersionedDocument vd, Stack<Integer> versions) {
Element e = vd.getRootElement().addElement("contextLabel");
e.setText("default");
}

Also to make the behavior consistent, the "contextLabel" should also be assigned with "default" in its declaration place, otherwise a migrated repository and a newly defined one will have different value for "contextLabel".