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

ExecutorStepExecution.PlaceholderTask getEnclosingLabel/computeEnclosingLabel incorrectly calculate node resulting in mislabeled stages in parallel if they don't have an agent

XMLWordPrintable

      The best I've managed to debug is to finger this code:

      https://github.com/jenkinsci/workflow-durable-task-step-plugin/blob/e63e949faeecb3b50293fad7b76865f4d650be52/src/main/java/org/jenkinsci/plugins/workflow/support/steps/ExecutorStepExecution.java#L464-L522

      I think it should be replaced/rewritten to use the same code methodology as flowGraphTable

      I've attached a jenkinsfile, you'll need to change the agent "pipeline" to an agent class that you have on your system. Then run the job and look at the build executor status.
      You should see two nodes, one with (Code) and one with (Frontend), instead you'll see two with the former and none with the latter.

      The logic in the highlighted code block doesn't actually pick nodes, it sort of picks a potential name, leaves it in a reachable variable, and then loops. Also, afaict, the n.equals method seems to spuriously result in true – i.e., whatever logic the author was expecting to use it to deterministically identify the right corresponding node fails miserably.

            Unassigned Unassigned
            jsoref Josh Soref
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: