jenkinsci / pipeline-graph-view-plugin

https://plugins.jenkins.io/pipeline-graph-view/
Other
107 stars 54 forks source link

Pipeline graphs broken by 236.v8d6eedb_b_9f00 #379

Closed stuartrowe closed 5 months ago

stuartrowe commented 5 months ago

Jenkins and plugins versions report

Environment ```text Jenkins: 2.440.1 OS: Linux - 5.8.7-1.el7.elrepo.x86_64 Java: 21.0.2 - Eclipse Adoptium (OpenJDK 64-Bit Server VM) --- ace-editor:1.0.1 active-directory:2.35 analysis-model-api:12.1.0 ansicolor:1.0.4 ant:497.v94e7d9fffa_b_9 antisamy-markup-formatter:162.v0e6ec0fcfcf6 apache-httpcomponents-client-4-api:4.5.14-208.v438351942757 asm-api:9.6-3.v2e1fa_b_338cd7 authentication-tokens:1.53.v1c90fd9191a_b_ authorize-project:1.7.1 badge:1.9.1 blueocean:1.27.11 blueocean-autofavorite:1.2.5 blueocean-bitbucket-pipeline:1.27.11 blueocean-commons:1.27.11 blueocean-config:1.27.11 blueocean-core-js:1.27.11 blueocean-dashboard:1.27.11 blueocean-display-url:2.4.2 blueocean-events:1.27.11 blueocean-git-pipeline:1.27.11 blueocean-github-pipeline:1.27.11 blueocean-i18n:1.27.11 blueocean-jira:1.27.11 blueocean-jwt:1.27.11 blueocean-personalization:1.27.11 blueocean-pipeline-api-impl:1.27.11 blueocean-pipeline-editor:1.27.11 blueocean-pipeline-scm-api:1.27.11 blueocean-rest:1.27.11 blueocean-rest-impl:1.27.11 blueocean-web:1.27.11 bootstrap4-api:4.6.0-3 bootstrap5-api:5.3.3-1 bouncycastle-api:2.30.1.77-225.v26ea_c9455fd9 branch-api:2.1152.v6f101e97dd77 build-blocker-plugin:1.7.9 build-environment:1.7 build-failure-analyzer:2.2.1-DRE4.0.1-fifa build-monitor-plugin:1.13+build.202109302210 build-name-setter:2.4.1 build-timeout:1.32 buildmetadata-plugin:4.14 caffeine-api:3.1.8-133.v17b_1ff2e0599 checks-api:2.0.2 cloudbees-bitbucket-branch-source:880.vcf4056c5a_71f cloudbees-disk-usage-simple:203.v3f46a_7462b_1a_ cloudbees-folder:6.901.vb_4c7a_da_75da_3 clover:4.14.2.596.vb_4d6475e990b_ command-launcher:107.v773860566e2e commons-lang3-api:3.13.0-62.v7d18e55f51e2 commons-text-api:1.11.0-95.v22a_d30ee5d36 conditional-buildstep:1.4.3 config-file-provider:968.ve1ca_eb_913f8c configuration-as-code:1775.v810dc950b_514 configuration-as-code-groovy:1.1 copyartifact:722.v0662a_9b_e22a_c cors:0.4.0 cors-filter:1.1 credentials:1337.v60b_d7b_c7b_c9f credentials-binding:657.v2b_19db_7d6e6d custom-artifact-archive-plugin:0.1 customizable-header:83.vf51a_828deb_b_e cvs:2.19.1 dark-theme:439.vdef09f81f85e data-tables-api:2.0.2-1 display-url-api:2.200.vb_9327d658781 docker-commons:439.va_3cb_0a_6a_fb_29 docker-workflow:572.v950f58993843 drecolumns:DRE2.18 durable-task:550.v0930093c4b_a_6 echarts-api:5.5.0-1 email-ext:2.105 envinject:2.908.v66a_774b_31d93 envinject-api:1.199.v3ce31253ed13 extended-bfa-plugin:1.01.00 extended-pipeline-basic-steps-plugin:1.02 extended-read-permission:53.v6499940139e5 extra-columns:1.26 favorite:2.208.v91d65b_7792a_c font-awesome-api:6.5.1-3 forensics-api:2.4.0 git:5.2.1 git-client:4.7.0 git-server:114.v068a_c7cc2574 github:1.38.0 github-api:1.318-461.v7a_c09c9fa_d63 github-branch-source:1781.va_153cda_09d1b_ gitlab-plugin:1.8.0 gradle:2.10 groovy:457.v99900cb_85593 groovy-label-assignment:1.2.0 groovy-postbuild:228.vcdb_cf7265066 gson-api:2.10.1-15.v0d99f670e0a_7 handy-uri-templates-2-api:2.1.8-30.v7e777411b_148 hashicorp-vault-plugin:364.vf5d54b_3dc313 htmlpublisher:1.32 http_request:1.18 instance-identity:185.v303dc7c645f9 ionicons-api:56.v1b_1c8c49374e jackson2-api:2.17.0-379.v02de8ec9f64c jacoco:3.3.5 jakarta-activation-api:2.1.3-1 jakarta-mail-api:2.1.3-1 javadoc:243.vb_b_503b_b_45537 javax-activation-api:1.2.0-6 javax-mail-api:1.6.2-9 jaxb:2.3.9-1 jdk-tool:73.vddf737284550 jenkins-design-language:1.27.11 jersey2-api:2.41-133.va_03323b_a_1396 jira:3.13 jira-steps:2.0.165.v8846cf59f3db jira-trigger:1.0.3 jjwt-api:0.11.5-77.v646c772fddb_0 job-dsl:1.87 job-summary:1.07 jobConfigHistory:1229.v3039470161a_d joda-time-api:2.12.7-29.v5a_b_e3a_82269a_ jquery:1.12.4-1 jquery-detached:1.2.1 jquery3-api:3.7.1-2 jsch:0.2.16-86.v42e010d9484b_ json-api:20240205-27.va_007549e895c json-path-api:2.9.0-33.v2527142f2e1d junit:1259.v65ffcef24a_88 kubernetes:4186.v1d804571d5d4 kubernetes-client-api:6.10.0-240.v57880ce8b_0b_2 kubernetes-credentials:0.11 ldap:711.vb_d1a_491714dc lockable-resources:1243.v346d600eea_24 log-parser:2.3.3 login-theme:146.v64a_da_cf70ea_6 logstash:2.5.0205.vd05825ed46bd-DRE0.0.3 mailer:472.vf7c289a_4b_420 mapdb-api:1.0.9-28.vf251ce40855d mask-passwords:173.v6a_077a_291eb_5 material-theme:0.5.2-rc100.6121925fe229 matrix-auth:3.2.2 matrix-project:822.824.v14451b_c0fd42 maven-plugin:3.23 mercurial:1260.vdfb_723cdcc81 metrics:4.2.21-449.v6960d7c54c69 mina-sshd-api-common:2.12.0-90.v9f7fb_9fa_3d3b_ mina-sshd-api-core:2.12.0-90.v9f7fb_9fa_3d3b_ monitoring:1.98.0 multiple-choice-plugin:1.15 naginator:1.436.vb_e769dcb_cdf6 next-executions:310.v52e770651319 node-iterator-api:1.5 nodejs:1.6.1 okhttp-api:4.11.0-172.vda_da_1feeb_c6e opentelemetry:3.1111.vc2733c03b_db_1 optional-run-parameter-plugin:1.07 p4:1.15.1 p4-script-plugin:1.06.1 pam-auth:1.10 parameterized-trigger:787.v665fcf2a_830b_ pipeline-build-step:540.vb_e8849e1a_b_d8 pipeline-graph-analysis:216.vfd8b_ece330ca_ pipeline-graph-view:236.v8d6eedb_b_9f00 pipeline-groovy-lib:704.vc58b_8890a_384 pipeline-input-step:491.vb_07d21da_1a_fb_ pipeline-milestone-step:111.v449306f708b_7 pipeline-model-api:2.2184.v0b_358b_953e69 pipeline-model-definition:2.2175.v76a_fff0a_2618 pipeline-model-extensions:2.2184.v0b_358b_953e69 pipeline-rest-api:2.34 pipeline-stage-step:305.ve96d0205c1c6 pipeline-stage-tags-metadata:2.2184.v0b_358b_953e69 pipeline-utility-steps:2.16.2 plain-credentials:179.vc5cb_98f6db_38 plot:2.1.12 plugin-util-api:4.1.0 popper-api:1.16.1-2 powershell:2.1 prism-api:1.29.0-13 prometheus:2.5.1 promoted-builds:945.v597f5c6a_d3fd pubsub-light:1.18 rebuild:330.v645b_7df10e2a_ resource-manager-plugin:5.2.0 role-strategy:713.vb_3837801b_8cc run-condition:1.7 scm-api:689.v237b_6d3a_ef7f script-security:1326.vdb_c154de8669 sectioned-view:1.25-DRE0.0.1 simple-theme-plugin:176.v39740c03a_a_f5 slack:684.v833089650554 snakeyaml-api:2.2-111.vc6598e30cc65 solarized-theme:0.1 sse-gateway:1.26 ssh-credentials:322.v124df57ed808 ssh-slaves:2.948.vb_8050d697fec sshd:3.303.vefc7119b_ec23 status-buildname-plugin:1.01 strict-crumb-issuer:2.1.1 structs:337.v1b_04ea_4df7c8 subversion:2.17.3 support-core:1416.v3a_46b_9b_c041a_ swarm:3.44 synopsys-coverity:3.0.3 theme-manager:215.vc1ff18d67920 throttle-concurrents:2.14 timestamp-fixer:DRE1.00 timestamper:1.26 token-macro:400.v35420b_922dcb_ trilead-api:2.142.v748523a_76693 update-sites-manager:2.0.0 variant:60.v7290fc0eb_b_cd view-job-filters:369.ve0513a_a_f5524 vsphere-cloud:2.27 warnings-ng:11.2.1 workflow-aggregator:596.v8c21c963d92d workflow-api:1291.v51fd2a_625da_7 workflow-basic-steps:1049.v257a_e6b_30fb_d workflow-cps:3883.vb_3ff2a_e3eea_f workflow-cps-global-lib:2.19 workflow-durable-task-step:1331.vc8c2fed35334 workflow-job:1400.v7fd111b_ec82f workflow-multibranch:773.vc4fe1378f1d5 workflow-scm-step:427.v4ca_6512e7df1 workflow-step-api:657.v03b_e8115821b_ workflow-support:865.v43e78cc44e0d zentimestamp:4.2 ```

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

OS: Linux - 5.8.7-1.el7.elrepo.x86_64

Reproduction steps

Look at the pipeline graph for a job and notice that it only contains the Start and End synthetic nodes.

Expected Results

(stage names redacted) image image

Actual Results

image image

Anything else?

Reverting db73d64d649c50be9686f5d944c244114586f4d6 resolves the issue. I will try to put together a minimal pipeline that reproduces the issue, but our current production pipelines are currently broken by this change.

Are you interested in contributing a fix?

No response

Waschndolos commented 5 months ago

Same issue here

timja commented 5 months ago

Can you provide a sample pipeline that reproduces the error?

Waschndolos commented 5 months ago

I'll try to provide one tomorrow - Happened in our companies Jenkins Instances.

moshavnik commented 5 months ago

Reproducing the issue is very simple. create the two following simple pipelines (simply copy the code to a regular, simple pipeline... no agent is needed):

MAKE SURE NOTHING IS WRITTEN TO THE CONSOLE OUTPUT BY ANY SHARED LIBRARY BEFORE RUNNING THESE PIPELINES

first pipeline:

stage("an ok stage")
{
  println "this stage can be viewed in pipeline overview"
}

second pipeline:

println "some random text"

stage("a NOT ok stage")
{
  println "this stage can NOT be viewed in pipeline overview"
}
Waschndolos commented 5 months ago

For us it's kind of related to including a shared library.

Working example:

pipeline {
    agent {
        label 'TEST_EXECUTION'
    }

    // libraries {
    //     lib('it-jenkins-pipeline-sharedlibrary')
    // }

    post {
        always {
            cleanWs()
        }
    }

    stages {
        stage("Bla bla blubbs") {
            steps {
                echo("do something")
            }
        }
    }
}

Returns image

Not working example:

pipeline {
    agent {
        label 'TEST_EXECUTION'
    }

    libraries {
        lib('it-jenkins-pipeline-sharedlibrary')
    }

    post {
        always {
            cleanWs()
        }
    }

    stages {
        stage("Bla bla blubbs") {
            steps {
                echo("do something")
            }
        }
    }
}

returns image

Edit: After upgrading to https://github.com/jenkinsci/pipeline-graph-view-plugin/releases/tag/237.v8959b_75f3c47 it works again