Remote access API job builds list limit shouldn't be hardcoded

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

XMLWordPrintable

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Minor
    • Component/s: core
    • Environment:
      Operating System: Fedora 30 64bit
      JDK: openjdk 8
      Jenkins verrsion: 2.200, from official docker hub container image

      When using the Remote Access API to get the list of builds in a job, for example - like this:

      curl https://${AUTH}@jenkins/job/myjob/api/json -G --data-urlencode 'tree=builds[number]'

      only the last 100 jobs are returned. This seem to be hard coded in the Job model (saw it here: https://github.com/jenkinsci/jenkins/blob/11c1146d0dc30e948ade8d1636ae01345c294291/core/src/main/java/hudson/model/Job.java#L737 )

      There should be a way to override this and get at the older builds - by paging, setting the limit, etc.

      The only workaround seem to be to check if a build exists by guessing its number (shouldn't be hard as they're sequential) and query each and every build URL directly. If a job has a few thousand builds, this gets really old really fast.

            Assignee:
            Unassigned
            Reporter:
            Oded Arbel
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: