Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27545

ghprbPullLink incorrectly links to https://api.github.com/repos/.....

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • ghprb-plugin
    • ghprb 1.16-8
      Jenkins ver. 1.605
      ghprb 1.28.6
      Jenkins ver. 1.632

    Description

      The ghprbPullLink is incorrectly linking to api.github.com is some circumstances.

      Incorrect:
      https://api.github.com/repos/org-here/repo-here/pulls/1234

      The prior behavior which is correct for our usage:
      https://github.com/org-here/repo-here/pull/1234

      Different builds show either result depending on how it was triggered. It seems when the build starts via a "retest this please" regex match we get the incorrect url.

      When the build is triggered by an initial pull request it is correct and can be resolved.

      Attachments

        Activity

          confirming the bug

          podarok Andriy Podanenko added a comment - confirming the bug
          gabel Martin F added a comment - - edited

          same issue here... we replaced api url with the github enterprise one and on a comment trigger it still tries to connect to api.github.com which obviously fails to retrieve to correct data.

          Workaround: Close the pull request and open a new one...

          trace
          Comment on issue #1,574 unable to get user: {2}
          Oct 13, 2015 1:57:26 PM SEVERE org.jenkinsci.plugins.ghprb.GhprbPullRequest check
          Couldn't check comment #144015
          java.net.UnknownHostException: api.github.com
          	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:85)
          	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
          	at java.lang.reflect.Constructor.newInstance(Constructor.java:541)
          	at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1686)
          	at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1684)
          	at java.security.AccessController.doPrivileged(AccessController.java:330)
          	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1682)
          	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1255)
          	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:479)
          	at com.ibm.net.ssl.www2.protocol.https.b.getResponseCode(b.java:40)
          	at org.kohsuke.github.Requester.handleApiError(Requester.java:489)
          	at org.kohsuke.github.Requester._to(Requester.java:248)
          	at org.kohsuke.github.Requester.to(Requester.java:194)
          	at org.kohsuke.github.GitHub.getUser(GitHub.java:278)
          	at org.kohsuke.github.GHIssueComment.getUser(GHIssueComment.java:71)
          	at org.jenkinsci.plugins.ghprb.GhprbPullRequest.checkComment(GhprbPullRequest.java:286)
          	at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:143)
          	at org.jenkinsci.plugins.ghprb.GhprbRepository.onIssueCommentHook(GhprbRepository.java:279)
          	at org.jenkinsci.plugins.ghprb.GhprbWebHook.handleComment(GhprbWebHook.java:33)
          	at org.jenkinsci.plugins.ghprb.GhprbRootAction.doIndex(GhprbRootAction.java:110)
          	at sun.reflect.GeneratedMethodAccessor753.invoke(Unknown Source)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
          	at java.lang.reflect.Method.invoke(Method.java:619)
          	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
          	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
          	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
          	at org.kohsuke.stapler.MetaClass$2.dispatch(MetaClass.java:165)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
          	at org.kohsuke.stapler.MetaClass$13.dispatch(MetaClass.java:411)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
          	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
          	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
          	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
          	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
          	at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
          	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:129)
          	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:123)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
          	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
          	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
          	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
          	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
          	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
          	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
          	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
          	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
          	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
          	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
          	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
          	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
          	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
          	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
          	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
          	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
          	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
          	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
          	at org.eclipse.jetty.server.Server.handle(Server.java:370)
          	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
          	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
          	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
          	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
          	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
          	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
          	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
          	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
          	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1176)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
          	at java.lang.Thread.run(Thread.java:795)
          Caused by: java.net.UnknownHostException: api.github.com
          	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:208)
          	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
          	at java.net.Socket.connect(Socket.java:642)
          	at com.ibm.jsse2.qc.connect(qc.java:675)
          	at com.ibm.jsse2.pc.connect(pc.java:28)
          	at sun.net.NetworkClient.doConnect(NetworkClient.java:192)
          	at sun.net.www.http.HttpClient.openServer(HttpClient.java:461)
          	at sun.net.www.http.HttpClient.openServer(HttpClient.java:556)
          	at com.ibm.net.ssl.www2.protocol.https.c.<init>(c.java:134)
          	at com.ibm.net.ssl.www2.protocol.https.c.a(c.java:169)
          	at com.ibm.net.ssl.www2.protocol.https.d.getNewHttpClient(d.java:20)
          	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:944)
          	at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:53)
          	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1311)
          	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:479)
          	at com.ibm.net.ssl.www2.protocol.https.b.getResponseCode(b.java:40)
          	at org.kohsuke.github.Requester.parse(Requester.java:454)
          	at org.kohsuke.github.Requester._to(Requester.java:227)
          	... 65 more
          
          gabel Martin F added a comment - - edited same issue here... we replaced api url with the github enterprise one and on a comment trigger it still tries to connect to api.github.com which obviously fails to retrieve to correct data. Workaround: Close the pull request and open a new one... trace Comment on issue #1,574 unable to get user: {2} Oct 13, 2015 1:57:26 PM SEVERE org.jenkinsci.plugins.ghprb.GhprbPullRequest check Couldn't check comment #144015 java.net.UnknownHostException: api.github.com at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:85) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57) at java.lang.reflect.Constructor.newInstance(Constructor.java:541) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1686) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1684) at java.security.AccessController.doPrivileged(AccessController.java:330) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1682) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1255) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:479) at com.ibm.net.ssl.www2.protocol.https.b.getResponseCode(b.java:40) at org.kohsuke.github.Requester.handleApiError(Requester.java:489) at org.kohsuke.github.Requester._to(Requester.java:248) at org.kohsuke.github.Requester.to(Requester.java:194) at org.kohsuke.github.GitHub.getUser(GitHub.java:278) at org.kohsuke.github.GHIssueComment.getUser(GHIssueComment.java:71) at org.jenkinsci.plugins.ghprb.GhprbPullRequest.checkComment(GhprbPullRequest.java:286) at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:143) at org.jenkinsci.plugins.ghprb.GhprbRepository.onIssueCommentHook(GhprbRepository.java:279) at org.jenkinsci.plugins.ghprb.GhprbWebHook.handleComment(GhprbWebHook.java:33) at org.jenkinsci.plugins.ghprb.GhprbRootAction.doIndex(GhprbRootAction.java:110) at sun.reflect.GeneratedMethodAccessor753.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:619) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96) at org.kohsuke.stapler.MetaClass$2.dispatch(MetaClass.java:165) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.MetaClass$13.dispatch(MetaClass.java:411) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649) at org.kohsuke.stapler.Stapler.service(Stapler.java:238) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132) at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:129) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:123) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1176) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang. Thread .run( Thread .java:795) Caused by: java.net.UnknownHostException: api.github.com at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:208) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) at java.net.Socket.connect(Socket.java:642) at com.ibm.jsse2.qc.connect(qc.java:675) at com.ibm.jsse2.pc.connect(pc.java:28) at sun.net.NetworkClient.doConnect(NetworkClient.java:192) at sun.net.www.http.HttpClient.openServer(HttpClient.java:461) at sun.net.www.http.HttpClient.openServer(HttpClient.java:556) at com.ibm.net.ssl.www2.protocol.https.c.<init>(c.java:134) at com.ibm.net.ssl.www2.protocol.https.c.a(c.java:169) at com.ibm.net.ssl.www2.protocol.https.d.getNewHttpClient(d.java:20) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:944) at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:53) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1311) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:479) at com.ibm.net.ssl.www2.protocol.https.b.getResponseCode(b.java:40) at org.kohsuke.github.Requester.parse(Requester.java:454) at org.kohsuke.github.Requester._to(Requester.java:227) ... 65 more

          People

            Unassigned Unassigned
            trbaker Trevor Baker
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: