GitHub Status setter: "201 Created" API response => Numeric value out of range of int

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Blocker
    • Component/s: github-api-plugin
    • None
    • Environment:
      github-plugin 1.27.0

      If 'Set GitHub commit status (universal)' is used, the job always fails because the GitHub plugin is not able to parseĀ a response from GitHub. The content of the response is, at least in my case, "IĀ did set the commit status successfully". That means the status isĀ set correctly on GitHub but the plugin fails anyway.

      ERROR: Build step failed with exception
      org.jenkinsci.plugins.github.common.CombineErrorHandler$ErrorHandlingException: org.kohsuke.github.HttpException: Server returned HTTP response code: 201, message: 'Created' for URL: https://api.github.com/repos/upgrades-migrations/redhat-upgrade-tool/statuses/d71bce490b81a6b7dcfa6d8ee9152ecf599c5763
       at org.jenkinsci.plugins.github.common.CombineErrorHandler.handle(CombineErrorHandler.java:74)
       at org.jenkinsci.plugins.github.status.GitHubCommitStatusSetter.perform(GitHubCommitStatusSetter.java:164)
       at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
       at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
       at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
       at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
       at hudson.model.Build$BuildExecution.post2(Build.java:185)
       at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
       at hudson.model.Run.execute(Run.java:1763)
       at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
       at hudson.model.ResourceController.execute(ResourceController.java:98)
       at hudson.model.Executor.run(Executor.java:410)
      Caused by: org.kohsuke.github.HttpException: Server returned HTTP response code: 201, message: 'Created' for URL: https://api.github.com/repos/upgrades-migrations/redhat-upgrade-tool/statuses/d71bce490b81a6b7dcfa6d8ee9152ecf599c5763
       at org.kohsuke.github.Requester.parse(Requester.java:613)
       at org.kohsuke.github.Requester._to(Requester.java:263)
       at org.kohsuke.github.Requester.to(Requester.java:225)
       at org.kohsuke.github.GHRepository.createCommitStatus(GHRepository.java:1000)
       at org.jenkinsci.plugins.github.status.GitHubCommitStatusSetter.perform(GitHubCommitStatusSetter.java:160)
       ... 10 more
      Caused by: java.io.IOException: Failed to deserialize {"url":"https://api.github.com/repos/upgrades-migrations/redhat-upgrade-tool/statuses/d71bce490b81a6b7dcfa6d8ee9152ecf599c5763","id":4299395834,"state":"success","description":"Build #12 succeeded in 2.4 sec","target_url":"https://gist.github.com/bf7888d68ade859fa7233b1fea9ddd08","context":"Unit tests for a commit","created_at":"2017-11-03T15:58:14Z","updated_at":"2017-11-03T15:58:14Z","creator":{"login":"preupg-bot","id":23213543,"avatar_url":"https://avatars2.githubusercontent.com/u/23213543?v=4","gravatar_id":"","url":"https://api.github.com/users/preupg-bot","html_url":"https://github.com/preupg-bot","followers_url":"https://api.github.com/users/preupg-bot/followers","following_url":"https://api.github.com/users/preupg-bot/following{/other_user}","gists_url":"https://api.github.com/users/preupg-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/preupg-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/preupg-bot/subscriptions","organizations_url":"https://api.github.com/users/preupg-bot/orgs","repos_url":"https://api.github.com/users/preupg-bot/repos","events_url":"https://api.github.com/users/preupg-bot/events{/privacy}","received_events_url":"https://api.github.com/users/preupg-bot/received_events","type":"User","site_admin":false}}
       at org.kohsuke.github.Requester.parse(Requester.java:603)
       ... 14 more
      Caused by: com.fasterxml.jackson.databind.JsonMappingException: Numeric value (4299395834) out of range of int
       at [Source: java.io.StringReader@66189d98; line: 1, column: 144] (through reference chain: org.kohsuke.github.GHCommitStatus["id"])
       at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:232)
       at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:197)
       at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.wrapAndThrow(BeanDeserializerBase.java:1311)
       at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:297)
       at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:121)
       at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2888)
       at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2034)
       at org.kohsuke.github.Requester.parse(Requester.java:601)
       ... 14 more
      Caused by: com.fasterxml.jackson.core.JsonParseException: Numeric value (4299395834) out of range of int
       at [Source: java.io.StringReader@66189d98; line: 1, column: 144]
       at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1369)
       at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:532)
       at com.fasterxml.jackson.core.base.ParserBase.convertNumberToInt(ParserBase.java:847)
       at com.fasterxml.jackson.core.base.ParserBase.getIntValue(ParserBase.java:643)
       at com.fasterxml.jackson.databind.deser.std.StdDeserializer._parseInteger(StdDeserializer.java:306)
       at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$IntegerDeserializer.deserialize(NumberDeserializers.java:319)
       at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$IntegerDeserializer.deserialize(NumberDeserializers.java:301)
       at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:464)
       at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:107)
       at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:295)
       ... 18 more
      Build step 'Set GitHub commit status (universal)' marked build as failure

            Assignee:
            Kirill Merkushev
            Reporter:
            Michal Bocek
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: