Skip to content

Incorrect graph for parallel stages if one is skipped #1002

@ashkraba

Description

@ashkraba

Jenkins and plugins versions report

Environment
Jenkins: 2.516.3
OS: Linux - 6.11.0-1015-gcp
Java: 21.0.8 - Ubuntu (OpenJDK 64-Bit Server VM)
pipeline-graph-view:654.vce1c59e149e2

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

Ubuntu 24.04

Reproduction steps

I have a job with two paralle stages, and one of them is skipped because of the condition

        stage('Build') {
            parallel {
                stage('Backend') { 
                    stages {
                        stage('Checkout') { steps { some_code } }
                    }
                }
                stage('Frontend') {
                    when {
                        anyOf { equals expected: 'test, actual: svcName; }
                        beforeAgent true
                    }
                    stages {
                        stage('Waiting for checkout') { steps { some_code }  }
                    }
                }
            }
        }

If the stage is not skipped graph looks fine,
Image
but if one of the stages is skipped get the next one
Image
But backend's line steps have been executed, and as the result the graph is not informative.

Expected Results

Two parallel lines where on is marked as skipped

Actual Results

One skipped stage

Anything else?

No response

Are you interested in contributing a fix?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions