Since updating https://plugins.jenkins.io/workflow-durable-task-step/ to version: 1206.v8a_d5f86e336b, some of our jobs have been broken. We boiled it down to seemingly the wrong paths being set due to nodes.
      The following pipeline returns a folder on the node ElMo despite being preceeded by the "node('master')"
      This does not happen if we remove the "customWorkspace 'workspace/node_workspace'"  but we would like to still use this path.
      Before the update, pwd() in the post step would return a path on the master node.

      #!groovy
      pipeline
      {
          agent
          {
              node{
                  label 'ElMo'
                  customWorkspace 'workspace/node_workspace'
              }
          }
          stages
          {
              stage('stuff to do on worker node')
              {
                  steps
                  {
                      script
                      {
                          echo 'test'
                      }
                  }
              }
          }
          post
          {
              always
              {
                  node('master')
                  {
                      script
                      {
                          print 'current folder pwd(): '+pwd()
                      }
                  }
              }
          }
      }
        

          [JENKINS-69936] PWD returning wrong path

          Paul created issue -
          Paul made changes -
          Description Original: Since updating [https://plugins.jenkins.io/workflow-durable-task-step/] to version: 1206.v8a_d5f86e336b, some of our jobs have been broken. We boiled it down to seemingly the wrong paths being set due to nodes.
          The following pipeline returns a folder on the node ElMo despite being preceeded by the "{_}node('master'){_}"
          This does not happen if we leave the "{_}customWorkspace 'workspace/node_workspace'"{_}  but we would like to still use this path.
          Before the update, pwd() in the post step would return a path on the master node.
          {code:java}
          #!groovy
          pipeline
          {
              agent
              {
                  node{
                      label 'ElMo'
                      customWorkspace 'workspace/node_workspace'
                  }
              }
              stages
              {
                  stage('stuff to do on worker node')
                  {
                      steps
                      {
                          script
                          {
                              echo 'test'
                          }
                      }
                  }
              }
              post
              {
                  always
                  {
                      node('master')
                      {
                          script
                          {
                              print 'current folder pwd(): '+pwd()
                          }
                      }
                  }
              }
          }
            {code}
          New: Since updating [https://plugins.jenkins.io/workflow-durable-task-step/] to version: 1206.v8a_d5f86e336b, some of our jobs have been broken. We boiled it down to seemingly the wrong paths being set due to nodes.
          The following pipeline returns a folder on the node ElMo despite being preceeded by the "{_}node('master'){_}"
          This does not happen if we remove the "{_}customWorkspace 'workspace/node_workspace'"{_}  but we would like to still use this path.
          Before the update, pwd() in the post step would return a path on the master node.
          {code:java}
          #!groovy
          pipeline
          {
              agent
              {
                  node{
                      label 'ElMo'
                      customWorkspace 'workspace/node_workspace'
                  }
              }
              stages
              {
                  stage('stuff to do on worker node')
                  {
                      steps
                      {
                          script
                          {
                              echo 'test'
                          }
                      }
                  }
              }
              post
              {
                  always
                  {
                      node('master')
                      {
                          script
                          {
                              print 'current folder pwd(): '+pwd()
                          }
                      }
                  }
              }
          }
            {code}
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-69933 [ JENKINS-69933 ]

          Jesse Glick added a comment -

          Need to add test coverage for this, but almost certainly caused by the final refactoring for JENKINS-49707. Nesting node steps is generally a bad idea (the original executor is basically sitting idle) but occasionally the least awkward option, and certainly this behavior is not expected.

          Jesse Glick added a comment - Need to add test coverage for this, but almost certainly caused by the final refactoring for JENKINS-49707 . Nesting node steps is generally a bad idea (the original executor is basically sitting idle) but occasionally the least awkward option, and certainly this behavior is not expected.
          Jesse Glick made changes -
          Link New: This issue is caused by JENKINS-49707 [ JENKINS-49707 ]
          Jesse Glick made changes -
          Assignee New: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Component/s New: workflow-durable-task-step-plugin [ 21715 ]
          Component/s Original: pipeline [ 21692 ]
          Jesse Glick made changes -
          Labels New: regression

          James Nord added a comment - - edited

          > the original executor is basically sitting idle

          not necessarily (but likely in most cases).  it may have spun up a system for test and the other nodes being for some other tool that requires some licence.

          James Nord added a comment - - edited > the original executor is basically sitting idle not necessarily (but likely in most cases).  it may have spun up a system for test and the other nodes being for some other tool that requires some licence.
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

            jglick Jesse Glick
            paul_lubos Paul
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: