Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47158

Warnings about workflow/*-parallel-synthetic.xml serializing WorkflowRun objects

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • blueocean-plugin
    • None
    • Blue Ocean - Candidates

      I get the following message in the log:

      -JENKINS-45892-: reference to Bitbucket/cvltk/PR-4 #9 being saved from unexpected /var/lib/jenkins/jobs/Bitbucket/jobs/cvltk/branches/PR-4/builds/9/workflow/4-parallel-synthetic.xml

      I'm doing some tricks to build in parallel on multiple different nodes, maybe that is the cause. Condensed example Jenkinsfile:

      platforms = [
        "gcc4.8-linux64": [nodeMatcher: 'linux64', config: "linux-gcc4.8"],
      ]
      
      @NonCPS
      def generateBuilds()
      {
        def builds = [:]
        for (p in platforms) {
          def name = p.key
          def platform = p.value
          builds[p.key] = { build(name, platform) }
        }
        return builds
      }
      
      def build(name, platform)
      {
        node(platform.nodeMatcher) {
          stage("Build ${name}") {
            echo "Hello, World for ${platform.config}!"
          }
        }
      }
      
      parallel generateBuilds()
      
      

          [JENKINS-47158] Warnings about workflow/*-parallel-synthetic.xml serializing WorkflowRun objects

          Emil Styrke created issue -
          Emil Styrke made changes -
          Link New: This issue is related to JENKINS-45892 [ JENKINS-45892 ]

          Daniel Beck added a comment -

          jglick PTAL WDYT?

          Daniel Beck added a comment - jglick PTAL WDYT?

          Jesse Glick added a comment -

          PipelineNodeGraphVisitor and FlowNodeWrapper seem to be doing something crazy I do not understand, and which is potentially inefficient and even dangerous. At a bare minimum, FlowNodeWrapper.run should be transient (and reinjected as needed from whatever code loads it).

          Jesse Glick added a comment - PipelineNodeGraphVisitor and FlowNodeWrapper seem to be doing something crazy I do not understand, and which is potentially inefficient and even dangerous. At a bare minimum, FlowNodeWrapper.run should be transient (and reinjected as needed from whatever code loads it).
          Jesse Glick made changes -
          Component/s New: blueocean-plugin [ 21481 ]
          Component/s Original: core [ 15593 ]
          Assignee New: Vivek Pandey [ vivek ]
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          Summary Original: Bug 45892 warning in system log New: Warnings about workflow/*-parallel-synthetic.xml serializing WorkflowRun objects

          Vivek Pandey added a comment -

          jglick FlowNodeWrapper is not serialized so not sure what you mean by making it transient.

          Vivek Pandey added a comment - jglick FlowNodeWrapper is not serialized so not sure what you mean by making it transient.

          Jesse Glick added a comment -

          vivek yes it is! You are creating and saving anonymous inner FlowNode subclasses. Trivially reproducible by running 2.77, adding blueocean-web + blueocean-pipeline-rest-impl, creating

          parallel a: {
              node {
                  echo 'a'
              }
          }, b: {
              node {
                  echo 'b'
              }
          }
          

          and running it and opening the result in BO. You will see tons of errors. jobs/…/builds/1/workflow/5-parallel-synthetic.xml contains all sorts of crazy stuff, for example:

          <node class="io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeGraphVisitor$3" plugin="blueocean-pipeline-api-impl@1.2.4">
          

          or

          <run resolves-to="hudson.model.Run$Replacer" plugin="workflow-job@2.14.1">
            <id>…#1</id>
          </run>
          

          (the origin of the warnings)

          or (eeek!)

          <parallelBranches serialization="custom">
            <unserializable-parents/>
            <java.util.ArrayDeque>
          

          etc.

          Jesse Glick added a comment - vivek yes it is! You are creating and saving anonymous inner FlowNode subclasses. Trivially reproducible by running 2.77, adding blueocean-web + blueocean-pipeline-rest-impl , creating parallel a: { node { echo 'a' } }, b: { node { echo 'b' } } and running it and opening the result in BO. You will see tons of errors. jobs/…/builds/1/workflow/5-parallel-synthetic.xml contains all sorts of crazy stuff, for example: <node class= "io.jenkins.blueocean.rest.impl.pipeline.PipelineNodeGraphVisitor$3" plugin= "blueocean-pipeline-api-impl@1.2.4" > or <run resolves-to= "hudson.model.Run$Replacer" plugin= "workflow-job@2.14.1" > <id> …#1 </id> </run> (the origin of the warnings) or (eeek!) <parallelBranches serialization= "custom" > <unserializable-parents/> <java.util.ArrayDeque> etc.
          Jesse Glick made changes -
          Priority Original: Major [ 3 ] New: Critical [ 2 ]
          James Dumay made changes -
          Epic Link New: JENKINS-35759 [ 171771 ]
          James Dumay made changes -
          Sprint New: Blue Ocean 1.4 - beta 2 [ 416 ]

            abayer Andrew Bayer
            estyrke Emil Styrke
            Votes:
            4 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: