Matrix Jobs - Sorted for start order?
See original GitHub issueDescribe the enhancement
When running a workflow file, the order of jobs appears to be sorted regarding the starting of jobs.
The jobs as listed on the left side of the web UI appear as they are listed in the matrix. Conversely, jobs seem to actually start based on an alpha sort?
I noticed this when trying to shorten total CI time. The workflow has more than 5 macOS jobs, and one job takes about twice the time that the others take. It also sorts last. If it’s the last job, total test time is 3x. If I can force it to run first, test time would be 2x.
Originally, it was at the end of the matrix. When I moved it to the beginning, nothing changed.
Code Snippet
Original matrix - truffleruby-head is the 2x job and starts last
ruby: [ 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, head, jruby, truffleruby-head ]
Modified matrix - truffleruby-head still starts last, but is listed first in the job list
ruby: [ truffleruby-head, jruby, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, head ]
Issue Analytics
- State:
- Created 3 years ago
- Reactions:9
- Comments:12 (1 by maintainers)
Top GitHub Comments
I have the same issue as well.
We’re working with Terraform and different workspaces using the same repo:
It is documented that order matters, however, it is chosen randomly when I use it:
Instead of running the Terraform process on dev-XXX first, it runs randomly and sometimes chooses stg-XXX first
The matrix is generated in a predictable order, based on how the defined order.
Something in the orchestration layer doesn’t respect the order.