Show relevant values in job name for matrix builds
Problem to Solve
In !33705 (merged) we are exposing job names as name index/total
, but this is not sufficient for someone who is looking at the pipeline jobs to understand what is being worked on there. We should add more context to this name, including variable names. Currently we show:
jobname: 1/2
jobname: 2/2
Intended users
User experience goal
This addresses an important UX gap
Proposal
The name with variables is already computed at: lib/gitlab/ci/config/normalizer/matrix_strategy.rb We should change it to replace the name
value at https://gitlab.com/gitlab-org/gitlab/-/blob/b600de609ac964e1e56259c8cd7f605aabbef243/lib/gitlab/ci/config/normalizer/matrix_strategy.rb#L58
In the job name we should show all the the values for all the jobs in the matrix. I.e.:
deploystacks:
stage: deploy
script:
- bin/deploy
parallel:
matrix:
- PROVIDER: aws
STACK:
- monitoring
- app1
- app2
- PROVIDER: ovh
STACK: [monitoring, backup, app]
- PROVIDER: [gcp, vultr]
STACK: [data, processing]
The above would generate the following parallel jobs each having different values for PROVIDER
and STACK
:
deploystacks: ovh, monitoring
deploystacks: ovh, backup
deploystacks: ovh, app
deploystacks: gcp, data
deploystacks: gcp, processing
deploystacks: vultr, data
deploystacks: vultr, processing
If there are very many configuration items or very long values this could extend off the visible area. These should be truncated, with a longer version shown on hover.