java.io.IOException: {"message":"Validation Failed","errors":[{"resource":"Status","code":"custom","message":"This SHA and context has reached the maximum number of statuses."}],"documentation_url":"https://developer.github.com/v3/repos/statuses/#create-a-status"}

Jenkins JIRA | Michael Grünewald | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    We are using Jenkins in conjunction with GitHub. Sometimes the tests are failing with the following exception: {noformat} Sep 10, 2015 7:19:35 AM hudson.model.AbstractBuild$AbstractBuildExecution reportError WARNING: Publisher 'Set build status on GitHub commit' aborted due to exception: java.io.IOException: {"message":"Validation Failed","errors":[{"resource":"Status","code":"custom","message":"This SHA and context has reached the maximum number of statuses."}],"documentation_url":"https://developer.github.com/v3/repos/statuses/#create-a-status"} at org.kohsuke.github.Requester.handleApiError(Requester.java:493) at org.kohsuke.github.Requester._to(Requester.java:245) at org.kohsuke.github.Requester.to(Requester.java:191) at org.kohsuke.github.GHRepository.createCommitStatus(GHRepository.java:774) at com.cloudbees.jenkins.GitHubCommitNotifier.updateCommitStatus(GitHubCommitNotifier.java:127) at com.cloudbees.jenkins.GitHubCommitNotifier.perform(GitHubCommitNotifier.java:84) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) {noformat} The error message seems to report the error details sent back by the GitHub RPC endpoint, stating that Jenkins tried to update more than 1000 times the statuses associated to a given SHA or “context”. Since we have a hand of different tests, it is strange to hit that 1000 limit. How to more precisely diagnose this (non-fatal) error and figure out what is causing that limit to be hit?

    Jenkins JIRA | 2 years ago | Michael Grünewald
    java.io.IOException: {"message":"Validation Failed","errors":[{"resource":"Status","code":"custom","message":"This SHA and context has reached the maximum number of statuses."}],"documentation_url":"https://developer.github.com/v3/repos/statuses/#create-a-status"}
  2. 0

    We are using Jenkins in conjunction with GitHub. Sometimes the tests are failing with the following exception: {noformat} Sep 10, 2015 7:19:35 AM hudson.model.AbstractBuild$AbstractBuildExecution reportError WARNING: Publisher 'Set build status on GitHub commit' aborted due to exception: java.io.IOException: {"message":"Validation Failed","errors":[{"resource":"Status","code":"custom","message":"This SHA and context has reached the maximum number of statuses."}],"documentation_url":"https://developer.github.com/v3/repos/statuses/#create-a-status"} at org.kohsuke.github.Requester.handleApiError(Requester.java:493) at org.kohsuke.github.Requester._to(Requester.java:245) at org.kohsuke.github.Requester.to(Requester.java:191) at org.kohsuke.github.GHRepository.createCommitStatus(GHRepository.java:774) at com.cloudbees.jenkins.GitHubCommitNotifier.updateCommitStatus(GitHubCommitNotifier.java:127) at com.cloudbees.jenkins.GitHubCommitNotifier.perform(GitHubCommitNotifier.java:84) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) {noformat} The error message seems to report the error details sent back by the GitHub RPC endpoint, stating that Jenkins tried to update more than 1000 times the statuses associated to a given SHA or “context”. Since we have a hand of different tests, it is strange to hit that 1000 limit. How to more precisely diagnose this (non-fatal) error and figure out what is causing that limit to be hit?

    Jenkins JIRA | 2 years ago | Michael Grünewald
    java.io.IOException: {"message":"Validation Failed","errors":[{"resource":"Status","code":"custom","message":"This SHA and context has reached the maximum number of statuses."}],"documentation_url":"https://developer.github.com/v3/repos/statuses/#create-a-status"}

    Root Cause Analysis

    1. java.io.IOException

      {"message":"Validation Failed","errors":[{"resource":"Status","code":"custom","message":"This SHA and context has reached the maximum number of statuses."}],"documentation_url":"https://developer.github.com/v3/repos/statuses/#create-a-status"}

      at org.kohsuke.github.Requester.handleApiError()
    2. org.kohsuke.github
      GHRepository.createCommitStatus
      1. org.kohsuke.github.Requester.handleApiError(Requester.java:493)
      2. org.kohsuke.github.Requester._to(Requester.java:245)
      3. org.kohsuke.github.Requester.to(Requester.java:191)
      4. org.kohsuke.github.GHRepository.createCommitStatus(GHRepository.java:774)
      4 frames
    3. com.cloudbees.jenkins
      GitHubCommitNotifier.perform
      1. com.cloudbees.jenkins.GitHubCommitNotifier.updateCommitStatus(GitHubCommitNotifier.java:127)
      2. com.cloudbees.jenkins.GitHubCommitNotifier.perform(GitHubCommitNotifier.java:84)
      2 frames
    4. Hudson
      BuildStepMonitor$1.perform
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      1 frame