GraphQL: Fix sort order of CiRunner.projects
What does this MR do and why?
Describe in detail what your merge request does and why.
This MR fixes a bug that was introduced by the changes to fix N+1 issues, where the sort order stopped being preserved.
Closes #407853 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Go to the shell in your GDK
gitlabdirectory and runbundle exec rake 'gitlab:seed:runner_fleet[root, rf5-, 10, 400]'. This will seed your GDK with some projects and runners required for testing this MR. -
Go to http://gdk.test:3000/-/graphql-explorer and execute the following query:
{ project( fullPath: "rf5-top-level-group-1/rf5-group-1.1/rf5-group-1.1.1/rf5-project-1-1-1-1" ) { runners(type: PROJECT_TYPE) { nodes { id projectCount projects(search: "rf5-", sort: "id_desc") { nodes { id fullPath } } } } } } -
Looking at a runner that contains multiple projects, the projects should be sorted by the requested order (try changing to
"id_asc", for instance).
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.
