allBuilds eagerly loads every build into memory before applying pagination

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major
    • Component/s: core
    • Environment:
      Ubuntu 16.04, Jenkins 2.89.4 (I also verified that no similar bug was fixed in the subsequent changelog)

      It seems that `?tree=allBuilds[number]{0,1}` unconditionally forces Jenkins to load all builds into memory. If the number of builds is large this canĀ denial-of-service your Jenkins instance.

      Steps to reproduce:

      1. Find a Jenkins instance with a job that has a very long history
      2. Verify that the standard REST query (for 100 jobs) executes quickly. For example: https://example.com/jenkins/job/my-job/api/json
      3. Now runĀ https://example.com/jenkins/job/my-job/api/json?tree=allBuilds[number]{0,1}

      Expected result: It runs fast

      Actual result: Jenkins goes out to lunch.

            Assignee:
            Unassigned
            Reporter:
            Edward Yang
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: