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

github-plugin doesn't properly handle API rate limit exhaustion

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • github-plugin
    • None
    • Jenkins 2.222.3
      Ubuntu 16.04
      Github Plugin 1.29.5

      In a situation where Github API calls are exhausted (rate limited), Github plugin will claim to have set a git commit status when it was unable to. 

      In such a scenario, using "Set GitHub commit status (universal)" as Post build action, a status line such as this will be printed out to the console of the affected build:

      [Set GitHub commit status (universal)] SUCCESS on repos [] (sha:bfc5a2c) with context: <project_name_redacted>

      On a build where the API calls are not exhausted, it should look more like this. 

      [Set GitHub commit status (universal)] SUCCESS on repos [GHRepository@1234abc [<should>, <be>, <lots>, <of>, <data>, <here>]] (sha:bfc5a2c) with context: <project_name_redacted>

      The issue appears to be that this line:
      https://github.com/jenkinsci/github-plugin/blob/51dc96b336818b6df56bb85ec91fa384fe55ab86/src/main/java/org/jenkinsci/plugins/github/status/GitHubCommitStatusSetter.java#L136

      doesn't care if it gets an empty list back.

      Somewhere we should raise an error rather than silently failing due to API rate limiting. 

            lanwen Kirill Merkushev
            irischad Chad Feller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: