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

Commitstatus id's can exceed Integer range

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • gitlab-api-plugin
    • Jenkins: 2.249.3
      OS: Linux - 3.10.0-1127.19.1.el7.x86_64
      ---
      gitlab-api:1.0.6
      gitlab-branch-source:1.5.1
      gitlab-plugin:1.5.13

    Description

      Builds using gitlab-api fails during the last steps of the build, when Jenkins tries to update the commit status to gitlab using the gitlab api. 

      com.fasterxml.jackson.core.exc.InputCoercionException: Numeric value (2149088644) out of range of int (-2147483648 - 2147483647) at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 17] at com.fasterxml.jackson.core.base.ParserMinimalBase._reportInputCoercion(ParserMinimalBase.java:601) at com.fasterxml.jackson.core.base.ParserMinimalBase.reportOverflowInt(ParserMinimalBase.java:570) at com.fasterxml.jackson.core.base.ParserBase.convertNumberToInt(ParserBase.java:889) at com.fasterxml.jackson.core.base.ParserBase._parseIntValue(ParserBase.java:802) at com.fasterxml.jackson.core.base.ParserBase.getIntValue(ParserBase.java:646) at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$IntegerDeserializer.deserialize(NumberDeserializers.java:472) at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$IntegerDeserializer.deserialize(NumberDeserializers.java:452) at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129) at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288) Caused: com.fasterxml.jackson.databind.JsonMappingException: Numeric value (2149088644) out of range of int (-2147483648 - 2147483647) at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 17] (through reference chain: org.gitlab4j.api.models.CommitStatus["id"]) at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:397) at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:356) at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.wrapAndThrow(BeanDeserializerBase.java:1714) at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:290) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151) at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1682) at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:977) at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:814) at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:233) at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:212) at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:132) at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1072) at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:882) Caused: javax.ws.rs.ProcessingException: Error reading entity from input stream. at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:897) at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:816) at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:298) at org.glassfish.jersey.client.InboundJaxrsResponse$1.call(InboundJaxrsResponse.java:91) at org.glassfish.jersey.internal.Errors.process(Errors.java:292) at org.glassfish.jersey.internal.Errors.process(Errors.java:274) at org.glassfish.jersey.internal.Errors.process(Errors.java:205) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:365) at org.glassfish.jersey.client.InboundJaxrsResponse.runInScopeIfPossible(InboundJaxrsResponse.java:240) at org.glassfish.jersey.client.InboundJaxrsResponse.readEntity(InboundJaxrsResponse.java:88) at org.gitlab4j.api.CommitsApi.addCommitStatus(CommitsApi.java:589) at io.jenkins.plugins.gitlabbranchsource.helpers.GitLabPipelineStatusNotifier.sendNotifications(GitLabPipelineStatusNotifier.java:279) at io.jenkins.plugins.gitlabbranchsource.helpers.GitLabPipelineStatusNotifier.access$300(GitLabPipelineStatusNotifier.java:51) at io.jenkins.plugins.gitlabbranchsource.helpers.GitLabPipelineStatusNotifier$JobCompletedListener.onCompleted(GitLabPipelineStatusNotifier.java:419) at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:209) at org.jenkinsci.plugins.workflow.job.WorkflowRun.finish(WorkflowRun.java:610) at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$800(WorkflowRun.java:137) at org.jenkinsci.plugins.workflow.job.WorkflowRun$GraphL.onNewHead(WorkflowRun.java:1037) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.notifyListeners(CpsFlowExecution.java:1473) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.run(CpsThreadGroup.java:489) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(CpsVmExecutorService.java:38) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:136) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59) 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:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
      

      Turns out the gitlab API has started returning CommitStatus id's that exceed Integer range.

      This is a bug in gitlab4j-api, registered as https://github.com/gitlab4j/gitlab4j-api/issues/805 and patched in this Pull Request https://github.com/gitlab4j/gitlab4j-api/pull/806 that is not yet merged and released.

      So basically, we just have to wait for a gitlab4j-api release, and make sure to bump that dependency in this Jenkins plugin when that happens.

      Attachments

        Issue Links

          Activity

            pnyheim Paul Nyheim created issue -
            pnyheim Paul Nyheim made changes -
            Field Original Value New Value
            Remote Link This issue links to "gitlab4j-api issue (Web Link)" [ 27436 ]

            PR mentioned above is fixed. gitlab4j-api 5.01 ist available (https://mvnrepository.com/artifact/org.gitlab4j/gitlab4j-api/5.0.1). Could you please update the dependencies .....

            festinaxl Christof Schreuer added a comment - PR mentioned above is fixed. gitlab4j-api 5.01 ist available ( https://mvnrepository.com/artifact/org.gitlab4j/gitlab4j-api/5.0.1). Could you please update the dependencies .....
            pnyheim Paul Nyheim added a comment - - edited

            So strange. It is not listed as released on github: https://github.com/gitlab4j/gitlab4j-api/releases

            pnyheim Paul Nyheim added a comment - - edited So strange. It is not listed as released on github: https://github.com/gitlab4j/gitlab4j-api/releases
            pnyheim Paul Nyheim added a comment - PR Created.  https://github.com/jenkinsci/gitlab-api-plugin/pull/8

            People

              baymac Parichay Barpanda
              pnyheim Paul Nyheim
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: