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

"Github API rate limit" blocks if Jenkins and Github system time are not in sync


      Our builds have been blocked today, by messages like these repeating every 3 minutes:

      09:06:43 GitHub API Usage: The quota may have been refreshed earlier than expected, rechecking...
      09:06:44 GitHub API Usage: Current quota has 4966 remaining (3712 over budget). Next quota of 5000 in 2 hr 14 min. Sleeping for 59 min.

      Took us a while to find out there is a hard assumption the system time of jenkins (System.currentTimeMillis()) and the system time of the github server (rateLimit.getResetDate().getTime()) are in sync.

      In our case, our jenkins system time was set back two hours, and the plugin therefore calculated it would never be possible to sync with github. (and the feedback from the plugin made us look in the wrong direction). 

      It would be a lot safer to look in the github response?


      pointer to code: https://github.com/jenkinsci/github-branch-source-plugin/blob/f1b3087f9e304b237fc24b09600ba370ef40faa8/src/main/java/org/jenkinsci/plugins/github_branch_source/Connector.java#L454 

            Unassigned Unassigned
            len Len Tan
            0 Vote for this issue
            1 Start watching this issue