Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-2106

GitHub secondary rate limit causing delays for /backport command

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.0
    • None
    • bots
    • None

      A user reported that /backport commands are taking a long time to process, up to 30 minutes. Here is an example:

      https://github.com/openjdk/jdk/commit/53bb7cd415f1d2e87d8f06ad5eb611bfdf8ef0ad

      Investigating this, I noticed that the CommitCommandWorkItem processing this was getting several failed REST calls to GitHub due to hitting a secondary rate limit. The message looks like this:

      {
        "documentation_url": "https://docs.github.com/en/free-pro-team@latest/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits",
        "message": "You have exceeded a secondary rate limit. Please wait a few minutes before you try again. If you reach out to GitHub Support for help, please include the request ID 3264:936D:123F68F:25A489C:6557D2AC."
      }

      Looking through logs, we are getting these specifically for REST calls to this endpoint on the openjdk-bots/jdk17u-dev repo:

      https://api.github.com/repos/openjdk-bots/jdk17u-dev/branches

      It should be noted that the number of branches on this repo is now large enough to require at least 5 pages to retrieve them all and the rate limit seems to hit randomly on any of the pagination calls. It's still unclear what the correct fix is here. I'm guessing that we started to hit the limit when the number of branches hit a certain threshold as that in turn caused a certain number of pagination calls to be needed. The reported /backport invocation was targeting jdk21u, so this isn't limited to jdk17u-dev, but I'm guessing it's primarily that repo that is causing the rate limit to be triggered, and when that happens, it also affects other repos under openjdk-bots.

            erikj Erik Joelsson
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: