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

Spans, formed from parallel() step's branches in pipeline, have longer duration than branches themselves #1038

Open
Artalus opened this issue Feb 7, 2025 · 1 comment

Comments

@Artalus
Copy link

Artalus commented Feb 7, 2025

Jenkins and plugins versions report

Environment
Jenkins: 2.483
OS: Linux - 5.15.0-124-generic
Java: 17.0.13 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
ace-editor:1.1
amazon-ecr:1.151.vb_ca_71ddd0b_cf
analysis-core:1.96
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-136.v5a_21779c63f8
asm-api:9.7.1-97.v4cc844130d97
atlassian-jira-software-cloud:2.0.15
authentication-tokens:1.119.v50285141b_7e1
authorize-project:2.0.0
aws-credentials:243.v41c19a_fb_5dcf
aws-java-sdk-ec2:1.12.772-477.v650d756dcf6d
aws-java-sdk-ecr:1.12.772-477.v650d756dcf6d
aws-java-sdk-minimal:1.12.772-477.v650d756dcf6d
aws-java-sdk2-core:2.30.10-22.v1339d66b_e0f4
aws-java-sdk2-ec2:2.30.10-22.v1339d66b_e0f4
aws-java-sdk2-ecr:2.30.10-22.v1339d66b_e0f4
basic-branch-build-strategies:190.v343a_ee70d920
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
bootstrap4-api:4.6.0-6
bootstrap5-api:5.3.3-1
bouncycastle-api:2.30.1.80-256.vf98926042a_9b_
branch-api:2.1208.vf528356feca_4
build-timeout:1.35
caffeine-api:3.1.8-133.v17b_1ff2e0599
checks-api:2.2.2
cloudbees-bitbucket-branch-source:934.4.1
cloudbees-disk-usage-simple:232.v713eeed2e1f4
cloudbees-folder:6.980.v5a_cc0cb_25881
command-launcher:118.v72741845c17a_
commons-compress-api:1.26.1-2
commons-lang3-api:3.17.0-84.vb_b_938040b_078
commons-text-api:1.13.0-153.v91dcd89e2a_22
configuration-as-code:1932.v75cb_b_f1b_698d
credentials:1405.vb_cda_74a_f8974
credentials-binding:687.v619cb_15e923f
data-tables-api:2.1.8-1
display-url-api:2.209.v582ed814ff2f
docker-commons:445.v6b_646c962a_94
docker-workflow:592.v1001d948426c
durable-task:581.v299a_5609d767
echarts-api:5.5.1-5
eddsa-api:0.3.0-4.v84c6f0f4969e
email-ext:1876.v28d8d38315b_d
favorite:2.225.v68765b_b_a_1fa_3
font-awesome-api:6.6.0-2
forensics-api:2.7.0
git:5.7.0
git-client:6.1.1
git-server:126.v0d945d8d2b_39
github:1.41.0
github-api:1.321-478.vc9ce627ce001
github-branch-source:1810.v913311241fa_9
github-checks:589.v845136f916cd
github-oauth:621.v33b_4394dda_4d
gradle:2.14
groovy:457.v99900cb_85593
gson-api:2.12.1-113.v347686d6729f
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-30.v7e777411b_148
hashicorp-vault-plugin:371.v884a_4dd60fb_6
htmlpublisher:1.37
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:310.v032f3f16b_0f8
javax-activation-api:1.2.0-7
javax-mail-api:1.6.2-10
jaxb:2.3.9-1
jdk-tool:83.v417146707a_3d
jenkins-design-language:1.27.16
jersey2-api:2.45-154.v4ded3dc34f81
jira:3.13
jjwt-api:0.11.5-112.ve82dfb_224b_a_d
jnr-posix-api:3.1.20-125.vb_6ec4b_21b_15e
job-dsl:1.90
joda-time-api:2.13.1-115.va_6b_5f8efb_1d8
jquery-detached:1.2.1
jquery3-api:3.7.1-2
jsch:0.2.16-86.v42e010d9484b_
json-api:20250107-125.v28b_a_ffa_eb_f01
json-path-api:2.9.0-138.vc943da_d833b_6
junit:1312.v1a_235a_b_94a_31
ldap:776.vddf3e325103b_
lockable-resources:1342.v673282c325c0
logstash:2.5.0218.v0a_ff8fefc12b_
mailer:489.vd4b_25144138f
matrix-auth:3.2.4
matrix-project:845.vffd7fa_f27555
maven-plugin:3.24
mercurial:1308.v0e0888fdb_628
metrics:4.2.21-461.v881e35d8fa_b_a_
mina-sshd-api-common:2.14.0-143.v2b_362fc39576
mina-sshd-api-core:2.14.0-143.v2b_362fc39576
momentjs:1.1.1
okhttp-api:4.11.0-183.va_87fc7a_89810
opentelemetry:3.1487.vf27fcf83deb_b_
opentelemetry-api:1.44.1.40.v93f5f8ca_42c3
pam-auth:1.11
parameterized-scheduler:277.v61a_4b_a_49a_c5c
parameterized-trigger:840.v3c7d4a_a_5e6c7
pipeline-build-step:551.v178956c49ef8
pipeline-github:2.8-159.09e4403bc62f
pipeline-github-lib:61.v629f2cc41d83
pipeline-graph-analysis:216.vfd8b_ece330ca_
pipeline-groovy-lib:749.v70084559234a_
pipeline-input-step:508.v584c0e9a_2177
pipeline-milestone-step:119.vdfdc43fc3b_9a_
pipeline-model-api:2.2221.vc657003fb_d93
pipeline-model-declarative-agent:1.1.1
pipeline-model-definition:2.2221.vc657003fb_d93
pipeline-model-extensions:2.2221.vc657003fb_d93
pipeline-rest-api:2.35
pipeline-stage-step:312.v8cd10304c27a_
pipeline-stage-tags-metadata:2.2221.vc657003fb_d93
pipeline-stage-view:2.35
pipeline-utility-steps:2.18.0
plain-credentials:183.va_de8f1dd5a_2b_
plugin-util-api:5.1.0
popper-api:1.16.1-3
popper2-api:2.11.6-5
prism-api:1.29.0-18
prometheus:811.v1823c780b_e8e
pubsub-light:1.18
pyenv-pipeline:2.1.2
resource-disposer:0.25
reverse-proxy-auth-plugin:238.v82ceca_8417a_6
scm-api:703.v72ff4b_259600
script-security:1369.v9b_98a_4e95b_2d
slack:761.v2a_8770f0d169
snakeyaml-api:2.3-123.v13484c65210a_
sonar:2.18
sse-gateway:1.27
ssh-agent:376.v8933585c69d3
ssh-credentials:349.vb_8b_6b_9709f5b_
ssh-slaves:3.1021.va_cc11b_de26a_e
sshd:3.330.vc866a_8389b_58
strict-crumb-issuer:2.1.1
structs:338.v848422169819
thinBackup:2.1.2
timestamper:1.28
token-macro:442.v4f452dc3c7c0
trilead-api:2.147.vb_73cc728a_32e
variant:70.va_d9f17f859e0
warnings:5.0.1
warnings-ng:11.12.0
workflow-aggregator:600.vb_57cdd26fdd7
workflow-api:1363.v03f731255494
workflow-basic-steps:1079.vce64b_a_929c5a_
workflow-cps:4014.vcd7dc51d8b_30
workflow-cps-global-lib:612.v55f2f80781ef
workflow-durable-task-step:1405.v1fcd4a_d00096
workflow-job:1498.v33a_0c6f3a_4b_4
workflow-multibranch:800.v5f0a_a_660950e
workflow-scm-step:427.v4ca_6512e7df1
workflow-step-api:686.v603d058a_e148
workflow-support:944.v5a_859593b_98a_
ws-cleanup:0.48

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

Master: Linux
Agents: unrelated

Reproduction steps

Tested on a really simple scripted pipeline utilizing parallel() block:

parallel([
    'branch 1': { sleep 1 },
    'branch 2': { sleep 2 },
    'branch 3': { sleep 3 },
    'branch 4': { sleep 4 },
])

OTel results are displayed in Jaeger.

Expected Results

  • an encompassing span for the whole parallel() call, with duration of 4+ seconds (longest sleep + setup/teardown)
  • under it, 4 more Parallel branch: ... spans, with duration corresponding directly to actual step spans done inside said branch: ~1, ~2, ~3, ~4 seconds

Similar to how the "pipeline steps" page visualizes the pipeline:

Image

Actual Results

Instead there is no single parent span for the parallel(), and all of the branch spans are 5+ seconds instead, aligned by the end of the whole paralllel() call.

Image

Anything else?

No response

Are you interested in contributing a fix?

No response

@kuisathaverat
Copy link
Contributor

The sleep steps have the correct duration, so I guess the parallel task does not return until all the parallel tasks return. It is probably something we cannot do anything about.

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