Skip to content

GraphQL: Fix off-by-1 JOB_COUNT_LIMIT limit

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR fixes a bug introduced 2 days ago while fixing an N+1 issue with a query. Instead of keeping the JOB_COUNT_LIMIT + 1 value, I limited to JOB_COUNT_LIMIT. This causes the runner details page to show 1000 for the job count whenever it has more than 1000 jobs, instead of 1000+. It seems that the specs that tested this behavior were flawed.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

before after
image image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports