Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditionally skipped stages that are named the same as other stages cause the latter stages to be hidden #558

Open
medianick opened this issue Nov 21, 2024 · 2 comments

Comments

@medianick
Copy link

Jenkins and plugins versions report

Environment
Jenkins: 2.462.3
OS: Linux - 6.1.109-118.189.amzn2023.x86_64
Java: 17.0.12 - Amazon.com Inc. (OpenJDK 64-Bit Server VM)
---
TestComplete:2.9.2
allure-jenkins-plugin:2.31.1
analysis-model-api:12.9.1
ansicolor:1.0.5
ant:511.v0a_a_1a_334f41b_
antisamy-markup-formatter:162.v0e6ec0fcfcf6
apache-httpcomponents-client-4-api:4.5.14-208.v438351942757
apache-httpcomponents-client-5-api:5.4-124.v31e2987e48f4
artifactory:4.0.8
asm-api:9.7.1-97.v4cc844130d97
authentication-tokens:1.119.v50285141b_7e1
aws-credentials:231.v08a_59f17d742
aws-java-sdk:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-api-gateway:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-autoscaling:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-cloudformation:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-cloudfront:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-codebuild:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-codedeploy:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-ec2:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-ecr:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-ecs:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-efs:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-elasticbeanstalk:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-elasticloadbalancingv2:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-iam:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-kinesis:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-lambda:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-logs:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-minimal:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-organizations:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-secretsmanager:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-sns:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-sqs:1.12.772-474.v7f79a_2046a_fb_
aws-java-sdk-ssm:1.12.772-474.v7f79a_2046a_fb_
aws-parameter-store:1.2.2
aws-secrets-manager-credentials-provider:1.214.va_0a_d8268d068
basic-branch-build-strategies:81.v05e333931c7d
blueocean:1.27.16
blueocean-autofavorite:1.2.5
blueocean-bitbucket-pipeline:1.27.16
blueocean-commons:1.27.16
blueocean-config:1.27.16
blueocean-core-js:1.27.16
blueocean-dashboard:1.27.16
blueocean-display-url:2.4.3
blueocean-events:1.27.16
blueocean-git-pipeline:1.27.16
blueocean-github-pipeline:1.27.16
blueocean-i18n:1.27.16
blueocean-jira:1.27.16
blueocean-jwt:1.27.16
blueocean-personalization:1.27.16
blueocean-pipeline-api-impl:1.27.16
blueocean-pipeline-editor:1.27.16
blueocean-pipeline-scm-api:1.27.16
blueocean-rest:1.27.16
blueocean-rest-impl:1.27.16
blueocean-web:1.27.16
bootstrap5-api:5.3.3-1
bouncycastle-api:2.30.1.78.1-248.ve27176eb_46cb_
branch-api:2.1200.v4b_a_3da_2eb_db_4
build-discarder:139.v05696a_7fe240
build-failure-analyzer:2.5.2
build-timeout:1.33
build-user-vars-plugin:176.vb_9c7907fd524
caffeine-api:3.1.8-133.v17b_1ff2e0599
calendar-view:0.3.4
checkmarx:2024.3.2
checks-api:2.2.1
claim:554.va_f9b_58b_0a_088
cloud-stats:336.v788e4055508b_
cloudbees-bitbucket-branch-source:910.v5b_9b_36e0379e
cloudbees-folder:6.955.v81e2a_35c08d3
cloudbees-jenkins-advisor:358.v58972d19b_1f0
cobertura:1.17
code-coverage-api:4.99.0
command-launcher:116.vd85919c54a_d6
commons-compress-api:1.26.1-2
commons-lang3-api:3.17.0-84.vb_b_938040b_078
commons-text-api:1.12.0-129.v99a_50df237f7
conditional-buildstep:1.4.3
config-file-provider:980.v88956a_a_5d6a_d
configuration-as-code:1873.vea_5814ca_9c93
copyartifact:757.v05365583a_455
coverage:1.16.1
credentials:1384.vf0a_2ed06f9c6
credentials-binding:681.vf91669a_32e45
custom-tools-plugin:0.8
dashboard-view:2.521.v339b_a_f4d8da_8
data-tables-api:2.1.8-1
datadog:8.1.0
disk-usage:1.2
display-url-api:2.204.vf6fddd8a_8b_e9
docker-commons:445.v6b_646c962a_94
docker-java-api:3.4.0-94.v65ced49b_a_7d5
docker-plugin:1.7.0
docker-workflow:580.vc0c340686b_54
dotnet-sdk:1.4.0
dtkit-api:3.0.2
durable-task:577.v2a_8a_4b_7c0247
ec2:1751.v47818f82a_83d
echarts-api:5.5.1-4
eddsa-api:0.3.0-4.v84c6f0f4969e
email-ext:1849.v6dd03b_f6e423
embeddable-build-status:487.va_0ef04c898a_2
envinject:2.919.v009a_a_1067cd0
envinject-api:1.199.v3ce31253ed13
extended-choice-parameter:382.v5697b_32134e8
extended-read-permission:53.v6499940139e5
external-monitor-job:215.v2e88e894db_f8
extra-columns:1.26
favorite:2.221.v19ca_666b_62f5
flexible-publish:0.16.1
folder-properties:1.2.1
font-awesome-api:6.6.0-2
forensics-api:2.6.0
generic-webhook-trigger:2.2.5
git:5.5.2
git-client:5.0.0
git-forensics:2.2.1
git-parameter:0.10.0
git-server:126.v0d945d8d2b_39
github:1.40.0
github-api:1.321-468.v6a_9f5f2d5a_7e
github-branch-source:1807.v50351eb_7dd13
github-checks:589.v845136f916cd
github-pr-comment-build:103.vc8919acf2a6b
global-slack-notifier:1.5
gradle:2.13.1
groovy:457.v99900cb_85593
gson-api:2.11.0-85.v1f4e87273c33
handy-uri-templates-2-api:2.1.8-30.v7e777411b_148
htmlpublisher:1.37
ignore-committer-strategy:29.v7c3891a_434c3
implied-labels:342.vf0a_690315013
instance-identity:201.vd2a_b_5a_468a_a_6
ionicons-api:74.v93d5eb_813d5f
jackson2-api:2.17.0-379.v02de8ec9f64c
jakarta-activation-api:2.1.3-1
jakarta-mail-api:2.1.3-1
javadoc:280.v050b_5c849f69
javax-activation-api:1.2.0-7
javax-mail-api:1.6.2-10
jaxb:2.3.9-1
jdk-tool:80.v8a_dee33ed6f0
jenkins-design-language:1.27.16
jersey2-api:2.44-151.v6df377fff741
jfrog:1.5.6
jira:3.13
jjwt-api:0.11.5-112.ve82dfb_224b_a_d
jnr-posix-api:3.1.19-2
job-dsl:1.89
job-import-plugin:3.6
jobConfigHistory:1283.veb_dfb_00b_5ec0
joda-time-api:2.13.0-93.v9934da_29b_a_e9
jquery:1.12.4-3
jquery3-api:3.7.1-2
jsch:0.2.16-86.v42e010d9484b_
jslint:0.8.2
json-api:20240303-101.v7a_8666713110
json-path-api:2.9.0-118.v7f23ed82a_8b_8
junit:1309.v0078b_fecd6ed
label-linked-jobs:6.0.1
last-changes:2.7.11
ldap:725.v3cb_b_711b_1a_ef
lockable-resources:1327.ved786b_a_197e0
mailer:488.v0c9639c1a_eb_3
mapdb-api:1.0.9-40.v58107308b_7a_7
mask-passwords:173.v6a_077a_291eb_5
matrix-auth:3.2.3
matrix-project:839.vff91cd7e3a_b_2
maven-plugin:3.24
metrics:4.2.21-458.vcf496cb_839e4
metrics-diskusage:3.0.0
mina-sshd-api-common:2.14.0-133.vcc091215a_358
mina-sshd-api-core:2.14.0-133.vcc091215a_358
monitoring:1.99.0
msbuild:1.35
mstest:1.0.5
naginator:1.481.vcb_b_384a_3de89
next-build-number:66.v4b_4762172d53
next-executions:392.v1d10c1b_5926f
node-iterator-api:55.v3b_77d4032326
nodejs:1.6.2
nodelabelparameter:1.13.0
nunit:547.v9dcdd7a_90848
okhttp-api:4.11.0-172.vda_da_1feeb_c6e
opencover:79.v78d40e1fc27e
pam-auth:1.11
parameterized-scheduler:277.v61a_4b_a_49a_c5c
parameterized-trigger:806.vf6fff3e28c3e
pipeline-aws:1.45
pipeline-build-step:540.vb_e8849e1a_b_d8
pipeline-github:2.8-159.09e4403bc62f
pipeline-github-lib:61.v629f2cc41d83
pipeline-githubnotify-step:49.vf37bf92d2bc8
pipeline-graph-analysis:216.vfd8b_ece330ca_
pipeline-graph-view:340.v28cecee8b_25f
pipeline-groovy-lib:744.v5b_556ee7c253
pipeline-input-step:495.ve9c153f6067b_
pipeline-milestone-step:119.vdfdc43fc3b_9a_
pipeline-model-api:2.2218.v56d0cda_37c72
pipeline-model-definition:2.2218.v56d0cda_37c72
pipeline-model-extensions:2.2218.v56d0cda_37c72
pipeline-rest-api:2.34
pipeline-stage-step:312.v8cd10304c27a_
pipeline-stage-tags-metadata:2.2218.v56d0cda_37c72
pipeline-stage-view:2.34
pipeline-utility-steps:2.18.0
plain-credentials:183.va_de8f1dd5a_2b_
plugin-usage-plugin:4.7
plugin-util-api:5.1.0
powershell:2.1
prism-api:1.29.0-18
promoted-builds:965.vcda_c6a_e0998f
publish-over:0.22
publish-over-cifs:0.16
publish-over-ftp:1.17
pubsub-light:1.18
resource-disposer:0.24
run-condition:1.7
saferestart:0.7
scm-api:696.v778d637b_a_762
script-security:1369.v9b_98a_4e95b_2d
shelve-project-plugin:3.2
simple-queue:1.4.6
skip-notifications-trait:448.va_e30ed251b_4c
slack:751.v2e44153c8fe1
snakeyaml-api:2.3-123.v13484c65210a_
sse-gateway:1.27
ssh-credentials:343.v884f71d78167
ssh-slaves:2.973.v0fa_8c0dea_f9f
sshd:3.330.vc866a_8389b_58
structs:338.v848422169819
subversion:1281.vc8837f91a_07a_
support-core:1523.v5486c8d6da_f3
testcomplete-xunit:1.1
text-finder:1.30
throttle-concurrents:2.14
timestamper:1.27
token-macro:400.v35420b_922dcb_
trilead-api:2.147.vb_73cc728a_32e
uno-choice:2.8.4
variant:60.v7290fc0eb_b_cd
versioncolumn:243.vda_c20eea_a_8a_f
versionnumber:1.11
view-job-filters:392.v2c0a_4dd46909
warnings-ng:11.11.0
workflow-aggregator:600.vb_57cdd26fdd7
workflow-api:1336.vee415d95c521
workflow-basic-steps:1058.vcb_fc1e3a_21a_9
workflow-cps:3993.v3e20a_37282f8
workflow-durable-task-step:1378.v6a_3e903058a_3
workflow-job:1436.vfa_244484591f
workflow-multibranch:795.ve0cb_1f45ca_9a_
workflow-scm-step:427.v4ca_6512e7df1
workflow-step-api:678.v3ee58b_469476
workflow-support:932.vb_555de1b_a_b_94
ws-cleanup:0.47
xunit:3.1.5

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

Amazon Linux 2023 on controller and agents

Reproduction steps

Create a pipeline with a stage called 'Build' that in turn contains a parallel block containing a set of stages which each contain sequential stages, several of which are also named 'Build'. Conditionally skip any of the parallel stages (using when conditions).

The overall stage model of relevance looks essentially like this:

  • 'Build' stage
    • parallel
      • 'A' stage, conditionally executed
        • 'Build' stage
        • 'Test' stage
      • 'B', conditionally executed
        • 'Build' stage
        • 'Test' stage

Expected Results

All stages render in appropriate fashion (e.g., gray circles, green checks, etc.); none are hidden.

Actual Results

None of the stages under the top-level 'Build' stage are rendered; it looks like this:

Image

(The earlier and later stages can be ignored for the purposes of this bug; they're not relevant)

Anything else?

If the top-level 'Build' stage is renamed to something else (that is not duplicated with another stage name), everything renders as intended.

Are you interested in contributing a fix?

No response

@timja
Copy link
Member

timja commented Nov 21, 2024

Likely related to #358

Could you provide a sample pipeline that reproduces this please?

The stages don't need to do anything you could put a single echo step in them if you want..

@medianick
Copy link
Author

medianick commented Nov 21, 2024

Could you provide a sample pipeline that reproduces this please?

Yes -- here you go:

pipeline {
    agent none
    stages {
        stage('Build') {
            parallel {
                stage('A') {
                    when {
                        expression { false }
                    }
                    stages {
                        stage('Build') {
                            steps {
                                echo 'Build A'
                            }
                        }
                    }
                }
                stage('B') {
                    stages {
                        stage('Build') {
                            steps {
                                echo 'Build B'
                            }
                        }
                    }
                }
            }
        }
    }
}

This renders like this:

Image

If I rename the inner 'Build' stages to 'Build A' and 'Build B', respectively, it renders correctly:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants