Skip to content

Multi-pipeline-graph-view should only include top-level stage nodes #1333

Description

@stuartrowe

Jenkins and plugins versions report

Environment
Jenkins: 2.534
OS: Windows 11 - 10.0
Java: 21.0.1 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
antisamy-markup-formatter:173.v680e3a_b_69ff3
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83
asm-api:9.10.1-216.va_9256d3b_844b_
bootstrap5-api:5.3.8-895.v4d0d8e47fea_d
bouncycastle-api:2.30.1.84-291.v9f17b_21896e2
branch-api:2.1280.v0d4e5b_b_460ef
caffeine-api:3.2.3-194.v31a_b_f7a_b_5a_81
checks-api:415.vf022234a_931d
cloudbees-folder:6.1100.ve9eed61d16c4
commons-lang3-api:3.20.0-109.ve43756e2d2b_4
commons-text-api:1.15.0-218.va_61573470393
configuration-as-code:2036.v0b_c2de701dcb_
credentials:1496.vf6821f162d4e
credentials-binding:725.ve52b_2328a_fde
display-url-api:2.217.va_6b_de84cc74b_
durable-task:671.v340ff7959010
echarts-api:6.0.0-1247.vf3e35a_c1813f
extended-pipeline-basic-steps-plugin:1.6.1
font-awesome-api:7.2.0-965.ve3840b_696418
git:5.10.1
git-client:6.6.0
github:1.46.0.1
github-api:1.330-492.v3941a_032db_2a_
github-branch-source:1917.v9ee8a_39b_3d0d
gson-api:2.14.0-201.v8eefe5515533
instance-identity:203.v15e81a_1b_7a_38
ionicons-api:94.vcc3065403257
jackson-annotations2-api:2.22-19.v10a_a_582ea_26e
jackson2-api:2.21.2-436.v29efdb_7418ff
jackson3-api:3.1.4-81.v804303fd947a_
jakarta-activation-api:2.1.4-1
jakarta-mail-api:2.1.5-1
jakarta-xml-bind-api:4.0.9-19.v2b_a_5b_44d9a_1c
javax-activation-api:1.2.0-8
jaxb:2.3.9-143.v5979df3304e6
jjwt-api:0.13.0-141.vd58b_a_9592b_6c
joda-time-api:2.14.2-193.v422b_efce56e0
jquery3-api:3.7.1-619.vdb_10e002501a_
json-api:20251224-185.v0cc18490c62c
json-path-api:3.0.0-218.vcd4dd1355de2
junit:1369.v15da_00283f06
mailer:534.v1b_36f5864073
matrix-project:870.v9db_fcfc2f45b_
metrics:4.2.37-494.v06f9a_939d33a_
mina-sshd-api-common:2.17.1-187.v0341274c2905
mina-sshd-api-core:2.17.1-187.v0341274c2905
okhttp-api:5.3.2-200.vedb_720a_cf1f8
pipeline-build-step:584.vdb_a_2cc3a_d07a_
pipeline-graph-view:999999-SNAPSHOT (private-7cea0a80-stuartr)
pipeline-groovy-lib:798.v5cc688825312
pipeline-input-step:551.vdff487c5998c
pipeline-model-api:2.2277.v00573e73ddf1
pipeline-model-definition:2.2277.v00573e73ddf1
pipeline-model-extensions:2.2277.v00573e73ddf1
pipeline-stage-step:345.va_96187909426
pipeline-stage-tags-metadata:2.2277.v00573e73ddf1
plain-credentials:199.v9f8e1f741799
plugin-util-api:6.1192.v30fe6e2837ff
prism-api:1.30.0-717.vb_f8360844b_53
rebuild:338.va_0a_b_50e29397
scm-api:728.vc30dcf7a_0df5
script-security:1402.v94c9ce464861
snakeyaml-api:2.5-149.v72471e9c6371
snakeyaml-engine-api:3.0.1-5.vd98ea_ff3b_92e
ssh-credentials:372.va_250881b_08cd
structs:362.va_b_695ef4fdf9
token-macro:477.vd4f0dc3cb_cf1
variant:70.va_d9f17f859e0
woodstox-core-api:7.1.1-1.v4d297985f397
workflow-api:1384.vdc05a_48f535f
workflow-basic-steps:1098.v808b_fd7f8cf4
workflow-cps:4331.v9d06ed4658ff
workflow-durable-task-step:1479.v56e587f413a_7
workflow-job:1571.1580.v18e46842c125
workflow-multibranch:821.vc3b_4ea_780798
workflow-scm-step:466.va_d69e602552b_
workflow-step-api:724.v538c2362b_dfb_
workflow-support:1015.v785e5a_b_b_8b_22

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows 11

Reproduction steps

Create a pipeline with top-level stages containing parallel blocks. The parallel branches could run build steps on different platforms for instance.

Example below:

stage("Build") {
    parallel([
        "Windows": {
            echo("Build Windows")
        },
        "Linux": {
            echo("Build Linux")
        }
    ])
}
stage("Test") {
    parallel([
        "Windows": {
            parallel([
                "Smoke": {
                    echo("Run Windows Smoke Test")
                },
                "Integration": {
                    echo("Run Windows Integration Test")
                }
            ])
        },
        "Linux": {
            parallel([
                "Smoke": {
                    echo("Run Linux Smoke Test")
                },
                "Integration": {
                    echo("Run Linux Integration Test")
                }
            ])
        }
    ])
}

Expected Results

Since the stages overview is limited to a single row, the top level stages should be included instead of any sub stage or parallel branch nodes.

Image

Actual Results

The nodes included in the stages overview are the parallel branches rather than the top level stages. Omitting the original top level stages in this pipeline hides the behavior of the pipeline.

This is even worse for the Test stage, where the nested parallel branch nodes for each of the test types are selected instead of enclosing platform parallel branch nodes.

Image

Anything else?

This issue is similar to one I had reported previously (#789). However, this issue is only concerned with the pipeline-graph-view ("stages" overview) on the job page.

Are you interested in contributing a fix?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions