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

allBuilds eagerly loads every build into memory before applying pagination

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • 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.

            Unassigned Unassigned
            ezyang Edward Yang
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: