Can we have more than 50 build jobs show in Drone UI?
For each repo, I can only see the latest 50 build jobs, any chance or options in drone for me to show more than 50 builds?
Can we have more than 50 build jobs show in Drone UI?
For each repo, I can only see the latest 50 build jobs, any chance or options in drone for me to show more than 50 builds?
I would like this too, but I think this will require a significant rework to Drone’s API methods to accept pagination parameters. Drone is not using an ORM for convenience methods (like pagination).
Relevant code: https://github.com/drone/drone/blob/master/store/datastore/builds.go#L128-L134
One way to accomplish this is to use OFFSET
:
const buildListQuery = `
SELECT *
FROM builds
WHERE build_repo_id = ?
ORDER BY build_number DESC
LIMIT 50 OFFSET ? # 50*page
Or FETCH FIRST
:
const buildListQuery = `
SELECT *
FROM builds
WHERE build_repo_id = ?
WHERE build_number < ? # most recent build_number - 50*(page-1)
ORDER BY build_number DESC
FETCH FIRST 50 ROWS ONLY
Thanks to explain the reason why.
Related issue: https://github.com/drone/drone/issues/1494