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

Github API usage rate limiting strategy NoThrottle is not getting used, instead it always moves to ThrottleOnOver.

XMLWordPrintable

      Jenkins Version: 2.289.3

      GitHub Branch Source Plugin Version: v2.11.3

      We are using enterprise github server hosted in our data center and configured correct API url. Then Jenkins Github API usage rate limiting strategy is configured to "Never check rate limit". But in logs I can see below message and also behavior is seen that it moves on to use Throttle at/near rate limit (ThrottleOnOver).

       

      "GitHub throttling is disabled, which is not allowed for public GitHub usage so ThrottleOnOver will be used instead. To configure a different rate limiting strategy, go to "GitHub API usage" under "Configure System" in the Jenkins settings.
      
      Jenkins is restricting GitHub API requests only when near or above the rate limit. To configure a different rate limiting strategy, such as having Jenkins attempt to evenly distribute GitHub API requests, go to "GitHub API usage" under "Configure System" in the Jenkins settings.
      

      I am suspecting issue at below code line,

      https://github.com/jenkinsci/github-branch-source-plugin/blob/e708675a334cf666f9a9010c2a22095e6ea2e7fa/src/main/java/org/jenkinsci/plugins/github_branch_source/ApiRateLimitChecker.java#L236

      Static value of github api url (GitHubServerConfig.GITHUB_URL) is passed here instead of configured github api url.

      So it always matches equals https://api.github.com to https://api.github.com at line

      https://github.com/jenkinsci/github-branch-source-plugin/blob/e708675a334cf666f9a9010c2a22095e6ea2e7fa/src/main/java/org/jenkinsci/plugins/github_branch_source/ApiRateLimitChecker.java#L104

       

       

            Unassigned Unassigned
            pvshewale Prashant Shewale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: