Fix inconsistent jobs ordering when using parallel >= 10"
What does this MR do and why?
This change fixes how parallel jobs are sorted in the pipeline minigraph on the MR page. Previously, jobs with names like "test 1/10", "test 2/10", "test 10/10" were being sorted alphabetically, which would put "test 10/10" before "test 2/10". Now they sort numerically using the existing sortable_name
method, so they appear in the correct order: 1, 2, 10, 20, etc.
This is the same approach used by Ci::Group.fabricate
.
References
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Create an MR with the following
.gitlab-ci.yml
config:
stages:
- test
FastTest:
stage: test
parallel: 10
script:
- echo "Running FastTest $CI_NODE_INDEX of $CI_NODE_TOTAL"
- sleep 5
- Open the MR and select the Pipelines tab.
- Select a stage and verify the jobs are correctly ordered.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #414452 (closed)
Edited by Anna Vovchenko