GraphQL: Add lastLines argument to CiJobTrace.htmlSummary
What does this MR do and why?
This MR adds a lastLines
argument to CiJobTrace.htmlSummary
so that we can control how many tail lines of the log are returned (still defaults to 10).
It also fixes an N+1 issue with the existing implementation of jobs { nodes { trace { htmlSummary } } }
.
Part of #421889 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before and after the N+1 query fix:
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Ensure that you have a few CI builds in your GDK.
-
Open http://gdk.test:3000/-/graphql-explorer and run the following query:
{ jobs(first: 30) { nodes { id trace { htmlSummary(lastLines: 2) } } } }
The htmlSummary
should return the number of lines specified in lastLines
.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.